2011年3月21日
摘要: 此文转载自http://www.cppblog.com/percyph/archive/2009/03/06/75742.html分三块来讲述:1 首先:在C中定义一个结构体类型要用typedef:typedef struct Student{int a;}Stu;于是在声明变量的时候就可:Stu stu1;如果没有typedef就必须用struct Student stu1;来声明这里的Stu实际上就是struct Student的别名。另外这里也可以不写Student(于是也不能struct Student stu1;了)typedef struct{int a;}Stu;但在c++里很简 阅读全文
posted @ 2011-03-21 08:57 comeby 阅读(164) 评论(0) 推荐(0) 编辑