Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
4
#import <Foundation/Foundation.h> @interface Person:NSObject{ int age,weight; } @property int age,weight; //property identifies the variables for setter and getter -(void)print; @end @implementation Person -(void) print{ NSLog(@"im %i years old and i have %i weight",age,weight); } @synthesize age,weight; //automaticaly builds our age and weight setter and getter methods @end int main(int argc, char *argv[]) { NSAutoreleasePool *pool=[[NSAutoreleasePool alloc]init]; Person *Luca=[[Person alloc]init]; Luca.age=15; Luca.weight=230; [Luca print]; [Luca release]; [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
Collections demo
Find Prime number
return whether any two numbers from the list add up to k
Teabag
a
Random Number Generation
c# with mysql
Evo Ivana da budes fancy :D
text
Fórum Mimicking Array Names Being Defined at Runtime