我正在写我的对象的第一个应用程序,我不明白为什么编译器给我的错误。 (但对于int代码的作品...)浮点函数返回值
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
// 1st var
NSLog(@"Hi, %f World!", res(1.0f, 2.0f, 3.0f));
}
return 0;
}
float res (float a, float b, float c)
{
float res=a+b+c;
return res;
}
什么是编译器给你的错误信息? –
在第一次被调用之前不应该声明functin吗? –