#include <iostream.h>
//在编程中使用typedef目的一般有两个,一个是给变量一个易记且意义明确的新名字,另一个是简化一些比较复杂的类型声明
struct student
{
int age;
int no;
} s1,s2;
typedef struct student my;
typedef int myint;
int main()
{ my q1;
myint x=12;
q1.no=x;
q1.age=19;
cout <<"no="<<q1.no<<" age="<<q1.age<<endl;
return 0;
}
//在编程中使用typedef目的一般有两个,一个是给变量一个易记且意义明确的新名字,另一个是简化一些比较复杂的类型声明
struct student
{
int age;
int no;
} s1,s2;
typedef struct student my;
typedef int myint;
int main()
{ my q1;
myint x=12;
q1.no=x;
q1.age=19;
cout <<"no="<<q1.no<<" age="<<q1.age<<endl;
return 0;
}