📜  函数覆盖 - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:23.043000             🧑  作者: Mango

代码示例1
// C++ program for function overriding
  
#include 
using namespace std;
  
class base
{
public:
    virtual void print ()
    { cout<< "print base class" <print(); 
       
    // Non-virtual function, binded at compile time
    bptr->show(); 
  
    return 0;
}