Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1634111
  • 博文数量: 126
  • 博客积分: 1541
  • 博客等级: 上尉
  • 技术积分: 1914
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-20 11:14
文章分类

全部博文(126)

文章存档

2014年(21)

2013年(42)

2012年(63)

分类: C/C++

2013-03-14 14:28:06

#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},
};                                              
阅读(487) | 评论(0) | 转发(0) |
0

上一篇:shell 练习 随笔

下一篇:gerrit 配置

给主人留下些什么吧!~~