- 相关推荐
爱立信从兴c++笔试题
求输出的结果
#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;
}
【爱立信从兴c++笔试题】相关文章:
爱立信机考笔经07-23
普天C++笔试题09-10
联想C++笔试题10-12
普天C++笔试题09-09
C++面试题11-08
C/C++笔试题05-24
C++和JAVA笔试题08-01
文思c++笔试题目10-12
C++笔试题目分享08-07
经典常用C++面试题10-21