#import <objc/objc.h>#import <objc/Object.h> @interface Klas {@private int c;@private int k;}+ (id) alloc; - (int) Sum: (int)v mon: (int)_x;@end; @implementacion Klas+ (id) alloc {}-(int)Sum: (int)v mon: (int)_x {c=v; k=x;return c+k;} int main () { return 0;}
Standard input is empty
prog.m:11:2: error: stray '@' in program prog.m:11:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Klas' prog.m:13:1: fatal error: method definition not in @implementation context compilation terminated.
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!