#import <objc/objc.h>#import <objc/Object.h> @interface TestObj : Object{ int num;}- (void)foo : (int)k;@end @implementation TestObj - (void)foo: (int)k {printf ("\f",k); } int main(){ id obj = [[TestObj alloc] init]; int y= [obj foo:5]; return 0;}
Standard input is empty
prog.m: In function 'main': prog.m:23:11: error: void value not ignored as it ought to be prog.m: At top level: prog.m:26:1: warning: '@end' missing in implementation context
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!