为什么编译器在提供的代码上给出以下错误消息:“initializer element is not constant”.相应的C/C++代码在
gcc下完美编译.
#import <Foundation/Foundation.h> const float a = 1; const float b = a + a; // <- error here int main (int argc,const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // insert code here... NSLog(@"Hello,World!"); [pool drain]; return 0; }