#include <iostream>
using namespace std;
class A{
public:
void f(){//1
cout<<1;
}
void f(int a){//2
cout<<2;
}
void f(int a,int b){//3
cout<<3;
}
};
class B:public A{
public:
void f(){//4
cout<<4;
}
void f(int a){//5
cout<<5;
}
};
int main(){
B b;
b.f();
b.f(2);
b.f(2,3);//overwrite
}
4与5应该叫overload,4,5与1,2,3应该叫overwrite。(个人见解)