我试图编译这段代码:
// Frist program example
#import Foundation/Foundation.h>
int main (int argc, const char * argv [])
{
NSAutoreleasePool * pool - [[NSAutoreleasePool alloc] init];
NSLog (@"Programming is fun!");
[pool drain];
return 0;
}
但是当我输入文件名时,编译器会显示一条错误消息:
./prog1.m: line 1: //: 是一个目录
./prog1.m: line 6: 意外标记'('附近的语法错误
./prog1.m: line 6: 'int main (int argc, const char *argv [])'