⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testprog.cpp

📁 C++编成数据结构与程序设计方法 D.S.Malk编著
💻 CPP
字号:
//Accessing protected members of a base class in the derived 
//class.

#include <iostream>
#include "protectMembClass.h"
#include "protectMembInDerivedCl.h"

using namespace std;

int main()
{
    bClass bObject;                                 //Line 1

    dClass dObject;                                 //Line 2

    bObject.print();                                //Line 3
    cout << endl;                                   //Line 4

    cout << "*** Derived class object ***" << endl; //Line 5

    dObject.setData('&', 2.5, 7);                   //Line 6

    dObject.print();                                //Line 7

    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -