我正在尝试将“CodeRunner”用作Objective-C游乐场,但我正在尝试向该类添加一个新方法:
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
}
}
-(void)printSomeThing {
NSLog("printing someThing")
}
我收到此错误:
Untitled.m:10:1: error: missing context for method declaration
-(void)printSomeThing {
^
1 error generated.
你们中的任何人都知道如何修复此错误吗?
我会非常感谢你的帮助。