typedef struct和struct 的区别 用途

#include<stdio.h>
typedef struct Student
{
    int a;
    struct Student *next;
}Pupil;
int main()
{

    Student ss; //这里会显示未定义, 所以Student只是在结构体里面做指针用的。 一般情况下 Student和Pupil会是同一个单词,这里只是做演示用的。
    Pupil pp,qq;
    pp.a=10;
    qq.a=12;
    pp.next=&qq;
    printf("%d
",pp.next->a);
}
原文地址:https://www.cnblogs.com/A-FM/p/5084988.html