Skip to content

Instantly share code, notes, and snippets.

@emergent
Created February 28, 2015 17:59
Show Gist options
  • Save emergent/71e44036c41289777e6d to your computer and use it in GitHub Desktop.
Save emergent/71e44036c41289777e6d to your computer and use it in GitHub Desktop.
#import <stdio.h>
#import <Foundation/NSObject.h>
@interface HelloClass : NSObject
- (void) sayHello;
@end
@implementation HelloClass
- (void) sayHello {
printf("Hello Objective-C world!\n");
}
@end
int main() {
id obj = [HelloClass alloc];
[obj sayHello];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment