fork download
  1. #import <Foundation/Foundation.h>
  2.  
  3. //Example Hello World program for Mac OS X Objective C
  4.  
  5. @interface HelloWorld : NSObject
  6. - (void) hello;
  7. @end
  8.  
  9. @implementation HelloWorld
  10. - (void) hello
  11. {
  12. NSLog(@"hello world!");
  13. }
  14. @end
  15.  
  16. int main(void)
  17. {
  18. HelloWorld *hw = [[HelloWorld alloc] init];
  19. [hw hello];
  20. [hw release];
  21. }
  22.  
Runtime error #stdin #stdout 0.02s 10584KB
stdin
Standard input is empty
stdout
Standard output is empty