I have a struct that extends an abstract class and then I add a boost multi_array inside as variable, I get the following error.
struct myrunnablestruct : zi::runnable{
boost::multi_array<int,3> myArray;
myrunnablestruct(unsigned int dimensions )
: myArray( boost::extents[ dimensions ][ dimensions ][ dimensions ] )
{ }
}
int main(){
myrunnablestruct mrs(8);
}
error: cannot declare variable '
mrs
' to be of abstract type because the following virtual functions are pure withinzi::concurrency::runnable
The error is unreleated to boost::multi_array<>
.
zi::runnable
has pure virtual member function(s), which your struct does not implement, and it is impossible to instantiate a type with pure virtual member functions. Presumably the error message tells you exactly which member functions you need to implement, but you didn't paste that part of the error message in your question.