I feel that objective-C is really a giggle! How can I write c ++?
# Import <Foundation/Foundation. h> <br/> @ Interface main: nsobject <br/>{< br/> int number; <br/> int I, J; <br/>}< br/>-(void) SETI :( INT) II andj :( INT) JJ; <br/>-(void) print; <br/> @ property int number; <br/> @ end <br/> @ implementation main <br/> @ synthesize number; <br/>-(void) SETI :( INT) II andj :( INT) JJ <br/>{< br/> I = II; <br/> J = JJ; </P> <p >}< br/>-(void) print <br/>{< br/> nslog (@ "Hello World @ % d/R ", number); <br/>}< br/> @ end <br/> int main (INT argc, const char * argv []) {<br/> NSAID utoreleasepool * Pool = [[NSAID utoreleasepool alloc] init]; <br/> main * OBJ = [main alloc]; <br/> [OBJ init]; <br/> [obj seti: 19 andj: 20]; <br/> [OBJ setnumber: 21]; <br/> [OBJ print]; <br/> [OBJ release]; <br/> [pool drain]; <br/> return 0; <br/>}< br/>
But I understand why I write Mac applications .... How can this problem be solved .. Distinctive ???