Re: [問題] 新手Overriding問題
你的問題 阿輝來解答
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
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章
33
68