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

📄 cadre.cpp

📁 这个是继承与派生的实验
💻 CPP
字号:
//Cadre.cpp
#include<iostream.h>
#include<string.h>
#include"Cadre.h"
Cadre::Cadre():person()//初始化
{
	post=NULL;
}
void Cadre::putpost(const char*po)
{
	delete[]post;
	post=new char[strlen(po)+1];
	strcpy(post,po);
}
Cadre::~Cadre()
{delete[]post;}
void Cadre::print()
{
	cout<<"post="<<post<<endl;   //输出职务
}

⌨️ 快捷键说明

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