谁会做C++的题啊……orz

来源:百度知道 编辑:UC知道 时间:2024/09/22 18:25:25
使用群体类完成人员信息的管理(只做输入和输出)。人员包括学生(姓名,性别,学号,单位,课程名,成绩),老师(姓名,编号,课程号),干部(姓名,编号,单位)。

#include <vector>
#include <iostream>
#include <stdio.h>
using namespace std;
struct student
{
char name[10];
bool sex;
char stdID[15];
char company[20];
char corss[10];
int score;

};
struct teacher
{
char name[10];
char teachID[15];//编号
char corssID[10];//课程号
};
struct cadre
{
char name[10];
char cadreID[15];//编号
char company[20];//单位
};

#define TY_STUDENT 0
#define TY_TEACHER 1
#define TY_CADRE 2

class personMg
{
public:
personMg(){
bexit=false;
};
~personMg(){};
private:
vector<student> std;
vector<teacher> tch;
vector<cadre> cdr;
private:
int type;
bool bexit;
void inputtype()
{
cout<<"输入要存储人的职业"<<endl;
cout<<"学生请输入 0"<<