implicit declaration of function "inet_addr" is invaild in C99
2013-04-20 15:47
1976 查看
struct sockaddr_in zeroAddress;
bzero(&zeroAddress, sizeof(zeroAddress));
zeroAddress.sin_len = sizeof(zeroAddress);
zeroAddress.sin_family = AF_INET;
zeroAddress.sin_port = htons(25);
zeroAddress.sin_addr.s_addr = inet_addr("XXX.XXX.XXX.XXX"); //implicit declaration of function "inet_addr" is invaild in C99
出现以上警告,导入如下头文件即可.....
#include <arpa/inet.h>
bzero(&zeroAddress, sizeof(zeroAddress));
zeroAddress.sin_len = sizeof(zeroAddress);
zeroAddress.sin_family = AF_INET;
zeroAddress.sin_port = htons(25);
zeroAddress.sin_addr.s_addr = inet_addr("XXX.XXX.XXX.XXX"); //implicit declaration of function "inet_addr" is invaild in C99
出现以上警告,导入如下头文件即可.....
#include <arpa/inet.h>
相关文章推荐
- Implicit declaration of function 'inet_addr' is invalid in C99
- iOS Implicit declaration of function XXX is invalid in C99”
- iOS开发Implicit declaration of function 'XXXX' is invalid in C99” 报错问题
- Implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in C99
- 报错:Implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in C99
- Implicit declaration of function 'sysctlbyname' is invalid in C99
- xCode中去除“Implicit declaration of function 'sysctl' is invalid in C99” 警告
- Implicit declaration of function 'SecItemExport' is invalid in C99
- error : implicit declaration of function CC_MD5 is invalid in C99
- IOS Implicit declaration of function 'xxxxxx ' is invalid in C99 错误
- Implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in C99
- xcode9报 Implicit declaration of function 'require' is invalid in c99 的错误
- Xcode出现error: Implicit declaration of function sysctl is invalid in C99
- 编译错误解决:implicit declaration of function 'close' is invalid in C99
- 关于Xcode6编译变更 “Implicit declaration of function 'sysctl' is invalid in C99” 报错问题
- Implicit declaration of function ‘xxxx’ is invalid in C99” 警告的解决办法
- xcode 中出现 Implicit declaration of function 'xxxx' is invalid in C99” 警告的解决办法
- iOS Implicit declaration of function XXX is invalid in C99”
- xCode中去除“Implicit declaration of function 'sysctl' is invalid in C99” 警告
- 即时通讯(环信)-bug Implicit declaration of function 'NSEaseLocalizedString' is invalid in C99