
C/C++
dingfengen
这个作者很懒,什么都没留下…
展开
-
inet_ntoa编译提示警告: 格式 ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat]
今天在做Linux下广播的时候,在编译期间inet_ntoa函数报警告: 格式 ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat]在运行的时候会报错误:段错误 (核心已转储)我的报错的程序是:printf("\nClient connection information原创 2016-06-24 18:02:50 · 13315 阅读 · 0 评论 -
共用体union用法讲解
共用体union用法讲解一、 联合说明和联合变量定义 联合也是一种新的数据类型, 它是一种特殊形式的变量。 联合说明和联合变量定义与结构十分相似。其形式为: union 联合名{ 数据类型 成员名; 数据类型 成员名; ... } 联合变量名; 联合表示几个变转载 2016-06-17 11:52:50 · 937 阅读 · 0 评论