"No previous prototype for function" warning警告错误
2011-11-13 21:07
453 查看
在编译《iphone开发秘籍》第八章的秘诀一的代码时碰到以下警告错误:
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"。如何取消这个警告错误呢?方法尝试了这两种都可以:
1.方法上加修饰符static
2.或者Project-Info -> TARGETS ->Build Settings -> LLVM GCC4.2 - Warnings组 -> Missing Function Prototypes Yes->No
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"。如何取消这个警告错误呢?方法尝试了这两种都可以:
1.方法上加修饰符static
2.或者Project-Info -> TARGETS ->Build Settings -> LLVM GCC4.2 - Warnings组 -> Missing Function Prototypes Yes->No
相关文章推荐
- "No previous prototype for function" warning警告错误解决
- "No previous prototype for function" warning警告错误解决
- \"No previous prototype for function\" warning警告错误
- XCode 解决"No previous prototype for function"
- "No provider for smtp"错误的处理
- "No provider for smtp"错误的处理
- ”No previous prototype for function “warning警告错误
- php提示错误:Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO)
- c语言报错-- no previous prototype for function
- freerradius 错误:pap: WARNING: No "known good" password found for the user
- 消除编译告警——warning: no previous prototype for
- 包含了头文件还有"Error[Li005]: no definition for"之类的错误原因
- 关于"The value for the useBean class attribute is invalid" 错误<转>
- There is no Action mapped for namespace / and action name"的错误
- C++异常:no matching function for call to "Matrix(Matrix&)"
- 警告"warning: type qualifiers ignored on function return type"
- 关于"No result defined for action com.ccxe.credit.action.ReportAction and result input"的错误
- C++常见错误之:no matching function for call to transform
- 错误集锦之 "Unparsed aapt error(s)! Check the console for output".