struct和typedef

来源:互联网 发布:brew mac 编辑:程序博客网 时间:2024/06/06 01:58
typedef struct _People   //_People为结构名{    int age;}People;                //People为结构别名 = struct _People//ortypedef struct{    int age;}People;


People代表一个结构,使用是为:

People onePeople;

onePeople.age;


struct _People        //_People为结构名{    int age;}people;             //people为结构变量

people是一个变量,使用时为:

people.age;



//~End~

原创粉丝点击