看板 EE_DSnP 關於我們 聯絡資訊
在declare objects of class Less and Greater 的時候 他會跑出error message 說 "cannt declare variable "a" to be of type "Less" because the following virtual functions are abstract: virtual bool Compare::compare(int, int) const" 然後下面會出現一句 :"at global scope". 請問這個error message是什麼意思呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.225.73
ric2k1:試試看將 1724 篇之 refCode/031309_funcObj.cpp 的第19行 03/14 13:32
ric2k1:的最右邊的 const 刪掉, 再 compile 看看, 妳應該會看到 03/14 13:32
ric2k1:類似的 error message ==> 檢查一下與 base class 的 03/14 13:33
ric2k1:function prototype 是否一致 03/14 13:33