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