7
25
1194
金牌会员
使用道具 举报 送花
60
776
4025
论坛元老
自定义头衔
VC*** 发表于 2024-12-3 15:10 这是结构体语法哦!
8
48
1455
这是结构体指针访问成员的语法,->是结构体指针访问,.是结构体变量访问,例如:
typedef struct class student_t{
int id;
int age;
} Student;
Student st1;
st1.id=10; //这是.访问结构体变量的写法
st1.age=15;
Student *p;
p=&stu1;
p->id=10;//这是->访问结构体指针的写法
p->id=15;
(*p).age 和 p->age等价的
2
86
1448
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|深圳国芯人工智能有限公司 ( 粤ICP备2022108929号-2 )
GMT+8, 2025-10-31 00:39 , Processed in 0.116163 second(s), 78 queries .
Powered by Discuz! X3.5
© 2001-2025 Discuz! Team.