0

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 within zi::concurrency::runnable

ildjarn
  • 62,044
  • 9
  • 127
  • 211
h1vpdata
  • 331
  • 2
  • 15

1 Answers1

0

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.

ildjarn
  • 62,044
  • 9
  • 127
  • 211
  • @Be.The.Water : Well there you go -- `myrunnablestruct` needs to provide an implementation of `void run()`. – ildjarn Apr 15 '11 at 06:43