á¢D?′óD?±êê?ìac++

时间:2024-05-29 15:28:41 面试笔试 我要投稿
  • 相关推荐

á¢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的面试通知发完了吗11-19

北京R&D面试归来,面试经验分享02-24

宝洁R&D 2011 暑假实习笔试面试11-20

R&D暑期实习终极面试纪实11-20

关于R&D面试的语言问题,我想说!11-19

PowerPoint制作眩目的3D幻灯片11-11

R&D三面面试新面试经验02-24