老師,這個錯誤怎么解決?
1>Debug\Shape.obj : warning LNK4042: 對象被多次指定;已忽略多余的指定
1>Circle.obj : error LNK2019: 無法解析的外部符號 "public: __thiscall Shape::~Shape(void)" (??1Shape@@QAE@XZ),該符號在函數(shù) __unwindfunclet$??0Circle@@QAE@N@Z$0 中被引用
1>main.obj : error LNK2001: 無法解析的外部符號 "public: __thiscall Shape::~Shape(void)" (??1Shape@@QAE@XZ)
1>Reat.obj : error LNK2001: 無法解析的外部符號 "public: __thiscall Shape::~Shape(void)" (??1Shape@@QAE@XZ)
1>Circle.obj : error LNK2019: 無法解析的外部符號 "public: __thiscall Shape::Shape(void)" (??0Shape@@QAE@XZ),該符號在函數(shù) "public: __thiscall Circle::Circle(double)" (??0Circle@@QAE@N@Z) 中被引用
1>Reat.obj : error LNK2001: 無法解析的外部符號 "public: __thiscall Shape::Shape(void)" (??0Shape@@QAE@XZ)
1>main.obj : error LNK2019: 無法解析的外部符號 "public: double __thiscall Shape::calArea(void)" (?calArea@Shape@@QAENXZ),該符號在函數(shù) _main 中被引用
1>D:\VS\calculate\Debug\calculate.exe : fatal error LNK1120: 3 個無法解析的外部命令
2016-11-07
是不是虛函數(shù)沒有寫內(nèi)容,如果沒有具體內(nèi)容,記得不要忘了后面的{}