fork download
  1. #import <objc/objc.h>
  2. #import <objc/Object.h>
  3.  
  4. @interface foo: Object
  5. {
  6. int num;
  7. }
  8. - (void)bar;
  9. -(void) morebar : (int) i;
  10. @end
  11.  
  12. @implementation foo
  13.  
  14. - (void)bar
  15. {
  16. printf("bar\n");
  17. }
  18.  
  19. - (void)morebar : (int) n
  20. {
  21. printf( "The morebar is: " );
  22. printf( "%i", n );
  23. printf( "\n" );
  24. }
  25.  
  26.  
  27. int main()
  28. {
  29. id obj = [[foo alloc] init];
  30. [obj bar];
  31. [obj morebar:250];
  32. return 0;
  33. }
  34. @end
Success #stdin #stdout 0s 2116KB
stdin
Standard input is empty
stdout
bar
The morebar is: 250