有所参考,有所借鉴,会写成自己的风格。从此篇开始,力求简单清晰
1:1 In the beginning God created the heavens and the earth.
1. 起别名
- 起了别名,别老是int,int的,让人看不明白
- 例子
// 起了别名,别老是int,int的,让人看不明白 typedef int size; void measure(size*psz); size array[4]; size len=file.getlength();
2. 函数指针
- 使用示例:
#include <stdio.h> typedef void (*FUNC)(); void f() { printf("hello"); } int main() { FUNC myf = &f; myf(); }
3. 数组
#include <stdio.h> typedef char Line[81]; int main(void) { Line text; }
🍃博主昵称:
一拳必胜客
有所参考,有所借鉴,会写成自己的风格。从此篇开始,力求简单清晰
特别鸣谢:木芯工作室 、Ivan from Russia