typedef的用法
来源:互联网 发布:java简单程序代码 编辑:程序博客网 时间:2024/05/03 07:39
类型定义 - typedef
1, 给某个类型指定别名
1, 给某个类型指定别名
2, 如, typedef int INTEGER;
int num; <==> INTEGER num;
3, 举例05-typedef.c
#include <stdio.h>struct Student{ int id; char name[100];};// struct Student <==> Studenttypedef struct Student Student;// struct Student * <==> Student * <==> PStudenttypedef Student * PStudent;// PTeacher <==> struct Teacher *// Teacher <==> struct Teachertypedef struct Teacher{ int id;} * PTeacher, Teacher;int main(void){ Student stu = {123, "张三"}; printf("%d, %s\n", stu.id, stu.name); PStudent pStu = &stu; printf("%d, %s\n", pStu->id, pStu->name); Teacher tea = {456}; printf("%d\n", tea.id); PTeacher pTea = &tea; printf("%d\n", pTea->id); return 0;}
- [typedef]typedef的高级用法
- typedef的用法
- typedef的用法
- 关于typedef的用法
- 关于typedef的用法
- 关于typedef的用法
- 关于typedef的用法
- 关于typedef的用法
- typedef 的用法
- 关于typedef的用法
- typedef的用法
- typedef的用法小结
- typedef 的用法
- typedef的用法
- typedef struct的用法
- typedef的用法
- typedef 的用法
- typedef的用法
- $("[name*='ecId_']").each(function(i){}代表什么意思啊????
- UVA 10110 Light, more light
- ok6410下nrf24l01驱动实现
- 将Hadoop建于Openstack之上
- hdu 4601 (bfs + dfs + trie)
- typedef的用法
- 黑马程序员----【java基础加强】张孝祥视频总结3
- ASP.NET MVC:利用ASP.NET MVC4的IBundleTransform集成LESS
- hdu 4310 Hero
- 讨论WebService安全机制的几篇博文
- vim 复制粘贴
- 小糖的糖果
- Lecture 3 (二)
- POJ3714+最近点对