typedef的用法

1165阅读 0评论2012-08-13 高傲的活着
分类:C/C++


点击(此处)折叠或打开

  1. #include <stdio.h>

  2. typedef struct Student
  3. {
  4.     int sid;
  5.     char name[100];
  6.     char ***;
  7. }* PSTU,STU; //PSTU 等价于struct Student * ,STU 等价于struct Student

  8. int main(void)
  9. {
  10.     STU stu;
  11.     PSTU ps = &stu;
  12.     ps->sid =99;
  13.     printf("%d\n",ps->sid);
  14.     
  15.     return 0;
  16. }

上一篇:连续存储数组的算法演示
下一篇:链表创建和链表遍历算法的演示