Skip to content

Instantly share code, notes, and snippets.

@cx20
Created June 9, 2012 18:15
Show Gist options
  • Save cx20/2902074 to your computer and use it in GitHub Desktop.
Save cx20/2902074 to your computer and use it in GitHub Desktop.
Hello, Objective-C World!
#import <Foundation/Foundation.h>
@interface HelloWorld : NSObject
{
}
- (void) sayHello;
@end
@implementation HelloWorld
- (void) sayHello
{
NSLog( @"Hello, Objective-C World!" );
}
@end
int main( int argc, char* argv[] )
{
id hw = [HelloWorld alloc];
[hw sayHello];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment