C++多態——虛函數表詳談

前篇C++——多態已經介紹了多態以及基類的虛函數表,下面詳細瞭解一下派生類的虛函數表模型 單繼承的虛函數表 class Base { public: virtual void Func1() { cout << "Base::Func1()" << endl; } void Func2() { cout << "Base::Func2()" << endl; } private: int _
相關文章
相關標籤/搜索