<C++>error LNK2001错误
摘要:从我的网易博客移动。。。。简单写了个C++的类练习。其中类中有个虚函数。居然提示 error LNK2001: unresolved external symbol "public: virtual bool __thiscall Base::isgood(void)" 错误。丫的。我没有需求要连接dll啊。很久不写难道这么弱智的类都出这么牛逼的错误。。。折腾了半天。才发现我定义的虚函数没有定义。也就是没有定义成纯虚函数。修改后。最后代码为: virtual bool isgood() =0;//后面的=0就是定义成纯虚函数必须的。就是没有后面的=0.才会发生上面错误这样。
阅读全文
posted @ 2012-03-22 20:47