Hi!
Someone knows whats the problem whit this obj-c code?
i just wanna see "miaau!" at the console...
thanks!
Someone knows whats the problem whit this obj-c code?
Code:
//
// main.m
// Untitled
#import <Cocoa/Cocoa.h>
#include <stdio.h>
#import <objc/Object.h>
// aqui comeca a definicao das interfaces
@interface Cat: Object
-(void) miau;
@end
// aqui comecam as implementacoes dos metodos
@implementation Cat
-(void) miau
{
printf("Miaau!\n");
}
@end
int main( int argc, const char *argv[] )
{
Cat *myCat = [[Cat alloc] init];
[myCat miau];
[myCat free];
return 0;
}
i just wanna see "miaau!" at the console...
thanks!