#include"stdafx.h"
#include<string>
#include"iostream"
using namespace std;
class Student
{
private:
int number;
string name;
float mark;
public:
Student(int nu, string na, float ma);
~Student();
void Output();
};
Student::Student(int nu, string na, float ma)
{
number = nu;
name = na;
mark = ma;
}
Student::~Student()
{
cout << "destruct..." << endl;
}
void Student::Output()
{
cout << "学号" << ":" <<number<< " 姓名" << ":" << name<<" 成绩" << ":"<<mark<<endl;
}
int main()
{
Student S1(1001,"张三",97.5);
Student S2(1002,"李四",83.0);
Student S3(1003,"王五",93.0);
Student S4(1004,"郭六",62.5);
Student S5(1005,"任七",77.0);
S1.Output();
S2.Output();
S3.Output();
S4.Output();
S5.Output();
return 0;
}