学校class

贲俊才
2023-12-01
#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;
}

 类似资料: