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

📄 ch11cperson.h

📁 此例子是学习C++的好东西
💻 H
字号:
//Program 11-8 CGolfer   CGolfer is derived from CPerson

// File:  Ch11CPerson.h

#ifndef _CH11CPERSON_H
#define _CH11CPERSON_H

#include <iostream>
#include <string>
using namespace std;

class CPerson
{
protected:
	string name;
	int age;
public:
	CPerson(string n, int a);
	CPerson(){ cout << "\nIn the do-nothing CPerson constructor \n"; }
	void WritePerson(){	cout <<  name << " is " << age << " years old.  \n"; }
	~CPerson() { cout << "\nDestructing CPerson object \n"; }
};

#endif

⌨️ 快捷键说明

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