摘要:
#是在宏定义中将参数进行字符串化的预处理特征,例如: #include <stdio.h> #define P(EXP) printf("%s %d\n", #EXP, EXP) int main() { int a=123; P(a); return 0; } 预编译展开后的部分代码 #defin 阅读全文
posted @ 2020-11-21 18:29
十七-2020
阅读(302)
评论(0)
推荐(0)
摘要:
可以使用宏定义方式对结构体成员进行赋值。 #include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct{ struct { int n1; int n2; } data; int n3; }n_t; #define 阅读全文
posted @ 2020-11-21 18:15
十七-2020
阅读(1633)
评论(0)
推荐(0)
摘要:
函数定义 #include <sys/types.h> #include <sys/socket.h> #include <ifaddrs.h> int getifaddrs(struct ifaddrs **ifap); 参数说明 struct ifaddrs { struct ifaddrs * 阅读全文
posted @ 2020-11-21 17:55
十七-2020
阅读(1214)
评论(0)
推荐(0)
浙公网安备 33010602011771号