25 lines
311 B
Plaintext
25 lines
311 B
Plaintext
#import <stdio.h>
|
|
#import <objc/Object.h>
|
|
|
|
@interface Hello: Object
|
|
- (void) init;
|
|
- (void) say;
|
|
@end
|
|
|
|
@implementation Hello
|
|
- (void) init {
|
|
[super init];
|
|
}
|
|
- (void) say {
|
|
printf("Hello world.\n");
|
|
}
|
|
@end
|
|
|
|
int main() {
|
|
Hello *hello = [Hello new];
|
|
[hello say];
|
|
[hello say
|
|
[hello free];
|
|
return 0;
|
|
}
|