Created
August 13, 2013 19:00
-
-
Save tai2/6224498 to your computer and use it in GitHub Desktop.
Hello world for Objective-C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| @interface HelloWorld : NSObject | |
| - (void) hello; | |
| @end | |
| @implementation HelloWorld | |
| - (void) hello { | |
| NSLog(@"hello world!"); | |
| } | |
| @end | |
| int main(void) { | |
| HelloWorld *hw = [[HelloWorld alloc] init]; | |
| [hw hello]; | |
| [hw release]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment