立信從興筆試題c++

時(shí)間:2018-12-31 12:00:00 資料大全 我要投稿

立信從興筆試題c++

求輸出的結(jié)果
#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++

【立信從興筆試題c++】相關(guān)文章:

1.立信從興電子筆試題

2.愛立信從興c++筆試題

3.名企招聘考試題匯總立信從興電子考題

4.C++筆試題

5.網(wǎng)易C++筆試題

6.聯(lián)想C++筆試題

7.普天C++筆試題

8.C/C++筆試題