#include<iostream>
using namespace std;
typedef int ZHANGSAN; // 又取一个名字
typedef struct Student {
int id;
char name[30];
char sex;
}ST;
int main(){
struct Student st;//等价于ST st;
struct Student* ps = &st;//等价于ST *ps;
ST st2;
st2.id = 2019;
cout << st2.id;
return 0;
}
#include<iostream>
using namespace std;
typedef int ZHANGSAN; // 又取一个名字
typedef struct Student {
int id;
char name[30];
char sex;
}* PST; //等价于struct Student *
int main(){
struct Student st;//等价于ST st;
struct Student* ps = &st;//等价于ST *ps;
PST p = &st;
p->id = 2019;
cout<<st.id;
return 0;
}