标签:
开发中常见错误和警告总结(七)
CGPoint randomPoint() { int half = 32; int freesize = 240 - 2 * half; return CGPointMake(random() % freesize + half, random() % freesize + half); }
warning:No previous prototype for function "randomPoint"。如何取消这个警告错误呢?方法尝试了这两种都可以:
2:使用Reachability的问题) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
做ios网络开发的肯定会用到苹果的官方库Reachability。warning:
1 + (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;
中
Declaration of ‘struct sockaddr_in‘ will not be visible outside of this function
解决办法很简单,Reachability.h中最前面添加头文件:#import <netinet/in.h>
标签:
原文地址:http://www.cnblogs.com/iCocos/p/4758881.html