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

📄 main.cpp

📁 person类 &#61656 数据成员: 姓名name、性别sex、年龄age &#61656 成员函数 (1)构造函数 (2)输出姓名、性别、年龄 派生类student
💻 CPP
字号:
//主函数
#include"person.hpp"
#include"student.hpp"
#include"teacher.hpp"
#include"graduate_student.hpp"
#include<iostream.h>
#include<string.h>
int main()
{int sc1[]={85,90,88,97,89};
 int sc2[]={87,97,83,93,85};
 student zhang("张三","男",20,"0901050608","0851",sc1,5);
 zhang.show1();
 zhang.show2(sc1,5);
 cout<<"\n";
 teacher li("李四","男",21,"001","教授");
 char teach[15];
 li.set(teach);
 li.show1();
 li.show2();
 cout<<"\n";
 graduate_student wang("王五","男",19,"0901010120","0852",sc2,5,"副教授","002");
 wang.show();
 return 0;
}

⌨️ 快捷键说明

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