2019年2月27日
摘要: struct 结构体 (地址递增) eg:struct myabc{ unsigned int a; unsigned int b; unsigned int c; unsigned int d; }; 注: int i; struct myabc buf; //struct myabc等同于int 阅读全文
posted @ 2019-02-27 23:27 kingofloong 阅读(235) 评论(0) 推荐(0)
摘要: 关键字: sizeof为关键字,并不是函数。 作用:编译器给我们查看内存空间容量的一个工具。 eg:int a; printf("the size is %d\n",sizeof a); printf("the size is %d\n",sizeof (a)); //注:int的大小跟编译器有关。 阅读全文
posted @ 2019-02-27 22:28 kingofloong 阅读(487) 评论(0) 推荐(0)
摘要: # 字符串化 ## 连接符号 eg: 阅读全文
posted @ 2019-02-27 11:35 kingofloong 阅读(738) 评论(0) 推荐(0)
摘要: 预处理的使用: ⑴包含头文件 #include ⑵宏定义 #define 替换,不进行语法检查 ①常量宏定义:#define 宏名 (宏体) (加括号为防止不进行语法检查而出现的错误) eg:#define ABC 5+3 printf(""the %d\n,ABC*5); //5+3*5 只进行替 阅读全文
posted @ 2019-02-27 11:08 kingofloong 阅读(162) 评论(0) 推荐(0)