结构体变量的简单计算
#include<iostream>
using namespace std;
int main()
{
struct{
char initial;
int age;
int grade;
}boy,girl;
boy.initial='R';
boy.age=17;
boy.grade=75;
girl.initial='H';
girl.age=boy.age-1;
girl.grade=82;
cout<<boy.initial<<" is "<<boy.age<<" years old and got a grade of "<<boy.grade<<endl;
cout<<girl.initial<<" is "<<girl.age<<" years old and got a grade of "<<girl.grade<<endl;
}