开发者

instantiating struct with boost multi_array

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 mr开发者_JAVA技巧s(8);
}

error: cannot declare variable 'mrs' to be of abstract type because the following virtual functions are pure within zi::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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜