c 语言 typedef 用法

来源:互联网 发布:37pao软件下载 编辑:程序博客网 时间:2024/05/11 16:05
#include <stdio.h>typedef struct Student {    int sid;    int age;}* PST, ST;// PST 等价于struct Student *// ST 等价于 struct Studentint main(int argc, const char * argv[]) {    ST st;    PST ps= &st;    ps->sid = 0;    ps->age = 10;    printf("%d %d \n",st.sid, st.age);    return 0;}


输出结果为:

0 10 


0 0
原创粉丝点击