看板 C_and_CPP 關於我們 聯絡資訊
你的問題 阿輝來解答 Regarding this mechanism, we call it as polymorphism, and u should use virtual function to implement such kind of function by using virtual identifier. 關於推文提到的 pure virtual function 就是在後面補個=0 The class which have a pure virtual function at least one but not all ,we call it as abstract. If the class only have pure virtual functions, we think it a interface. — 不用謝,裝逼是我的興趣 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 42.72.199.117 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1561887163.A.2D8.html