简介
界面比较简单,主函数请自行处理,完整版可以看这篇博客https://blog.csdn.net/algorithmyyds/article/details/122153488
代码
#include<bits/stdc++.h>
using namespace std;
class school
{
private:
string name;
struct student
{
string s_name;
int number;
};
student stu[2005];
int sum;
public:
school():name(""),sum(0)
{
for(i=1;i<=2000;i++)
{
stu[i].number=i;
stu[i].s_name="";
}
}
school(string n):name(n),sum(0)
{
for(i=1;i<=2000;i++)
{
stu[i].number=i;
stu[i].s_name="";
}
}
school(int s):name(""),sum(s)
{
for(i=1;i<=2000;i++)
{
stu[i].number=i;
stu[i].s_name="";
}
}
school(string n,int s):name(n),sum(s)
{
for(i=1;i<=2000;i++)
{
stu[i].number=i;
stu[i].s_name="";
}
}
};
int main()
{
return 0;
}