Skip to content

Instantly share code, notes, and snippets.

@aya-eiya
Created April 20, 2012 05:38
Show Gist options
  • Save aya-eiya/2426344 to your computer and use it in GitHub Desktop.
Save aya-eiya/2426344 to your computer and use it in GitHub Desktop.
WindowsでObjective-C
#import <stdio.h>
#import <objc/object.h>
@interface Hello : Object
-(void)sayHello;
@end
@implementation Hello
-(id) init {
self=[super init];
return self;
}
-(void) sayHello{
printf("Hello Objective-C\n");
}
@end
int main(void){
Hello *myHello = [[Hello alloc] init];
[myHello sayHello];
[myHello free];
return 0;
}
@aya-eiya
Copy link
Author

NSObjectなんかは使えないので、文法の確認とかのみで使いましょう。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment