int main()
{
int a;
typedef struct
{
int i;
int j;
}type1;
typedef type1 type[10]; //Please explain this line ?
typedef struct
{
int l;
type c;
}type2;
type2 x;
x.c[0].i=1; //How can we write this??
x.c[0].j=2;
x.c[2].j=3;
printf("%d",x.c[2].j);
return 0;
}
程序正在成功编译,我不希望因为
typedef type1 type[10];
请在这里解释 typeded 的行为。我所知道的是我们可以在 typedef 的帮助下定义一个别名。
输出:3