- 相關推薦
á¢D?′óD?±êê?ìac++
á¢D?′óD?±êê?ìac++
?óê?3?μ??á1?
#include <iostream>
using namespace std;
class Base
{
public:
void func(const char* str){cout << "Base: " << str << endl;}
virtual void func(int num){cout << "Base: " << num << endl;}
};
class Derived : public Base
{
public:
void func(const char* str){cout << "Derived: " << str << endl;}
void func(int num){cout << "Derived: " << num << endl;}
void func(){cout << "The Function is in Derived!" << endl;}
};
int main()
{
Base *pB;
Derived ObjD;
pB = &ObjD;
pB->func(11);
pB->func("Hello");
// pB->func();
getchar();
return 0;
}
【á¢D?′óD?±êê?ìac++】相關文章:
???D·ü??5D?ê±???ùí¨DD±£°2è?11-29
R&D intern 二面11-19
R&D的面試通知發(fā)完了嗎11-19
寶潔R&D 2011 暑假實習筆試面試11-20
R&D暑期實習終極面試紀實11-20
關于R&D面試的語言問題,我想說!11-19
PowerPoint制作眩目的3D幻燈片11-11
R&D三面面試新面試經(jīng)驗02-24