#include
typedef struct student
{int h;int t};
struct student tt[]={
[0]={2,3},
[1]={3,4},
[2]={5,6},
};
void main()
{
int i=0;
for(i;i<3;i++)
printf(" stdent[%d] %d %d ",i,tt[i].h,tt[i].t);
}
yangfeng@sbuild:~/test/test1$ ./a.out
stdent[0] 2 3 stdent[1] 3 4 stdent[2] 5 6 yangfeng@sbuild:~/test/test1$
#include
typedef struct student
{int h;int t};
struct student tt[]={
[0]={.h=2,.t=3},
[1]={.h=3,.t=4},
[2]={.h=5,.t=6},
};
阅读(503) | 评论(0) | 转发(0) |