?????????????????C++?????????д??????????????????????C++?????????????????????????????????????£?
????1.???????????overload????????????????????????????????????в???????У???????????????????????????????????????????б??????????????????????????????????????
??????????????£?
????class A{
????public:
????void test(int i);
????void test(double i);
????void test(int i?? double j);
????void test(double i?? int j);
????int test(int i);         //??????????
????};
????????????????????????????????????????????
????2.??д????д??????override???????????????????????????????д?????????????????亯???????????б???????????????ж???????????б???д???????????к????岻??????????????????????????????????????д????????????????д????????д??????б???д???????????virtual???Ρ?
??????????????£?
????#include<iostream>
????using namespace std;
????class A{
????public:
????virtual void fun3(int i){
????cout << "A::fun3() : " << i << endl;
????}
????};
????class B : public A{
????public:
????//??д
????virtual void fun3(double i){
????cout << "B::fun3() : " << i << endl;
????}
????};
????int main(){
????A a;
????B b;
????A * pa = &a;
????pa->fun3(3);
????pa = &b;
????pa->fun3(5);
????system("pause");
????return 0;
????}
??????????麯???????????????????????麯?????????????
????3?????
???????????д??????
??????1????Χ??????д?????д??????????????У??????????????????????С?
??????2????????????д????д??????????б????????????????????????????б?????????
??????3??virtual????????д???????????virtual???Σ???????????????????????virtual???Σ????????С?