文件
freopen("slyat.in","r",stdin);
freopen("slyar.out","w",stdout);
fclose(stdin); fclose(stdout);
结构体
定义结构体时同时定义变量
struct student{
string name;
int chinese,math;
Int total;
}a[100];
先定义结构体后定义变量
struct student{
string name;
int chinese,math;
Int total;
};
student a[100];