Julia999 发表于 2019-8-1 11:59:03

typedeft

直接上代码:#include<stdio.h>
#include<malloc.h>

typedef struct Student
{
        int id;
        char name;
        char sex;
}*PSTU,STU;//等价于ST代表了 struct Student,PST 代表了struct Student *
int main()
{
        STU st;//struct Student st;
        PSTU ps=&st;//struct Student *ps=&st;
        ps->id=99;

        return 0;
}

页: [1]
查看完整版本: typedeft