0
我有一个结构,扩展一个抽象类,然后我添加一个boost multi_array里面作为变量,我得到以下错误。实例化结构与提升multi_array
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
谢谢你是对的,它是void run() – h1vpdata 2011-04-15 06:42:26
@Be.The.Water:那么你去 - 'myrunnablestruct'需要提供'void run()'的实现。 – ildjarn 2011-04-15 06:43:29