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
Only unique chars into string?
Classes, properties, methods, ling begining
C# practice
The Fisher–Yates shuffle array extension method
Distinct of the given array
lj
train 11111111
Vídeo01 - Main
Explorer Diamond
Linq FirstOrDefault() null check in c#