fork(1) download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3.  
  4. @interface TestObj : Object
  5. {
  6. int num;
  7. }
  8. - (void)foo;
  9. @end
  10.  
  11. @implementation TestObj
  12.  
  13. - (void)foo {
  14. printf("foo\n");
  15. }
  16.  
  17. int main()
  18. {
  19. id obj = [[TestObj alloc] init];
  20. [obj foo];
  21. return 0;
  22. }
  23. @end
Success #stdin #stdout 0.01s 10176KB
stdin
Standard input is empty
stdout
foo