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
Konsol Kelebek Deseni
merging of sorted arrays
Raise Meldings logikk
Strings: Padding Integers and Handling Decimal Float Numbers
HashPassword
D15
0/1 Knapsack problem using Iterative Approach
String concat operation (+) vs StringBuilder
Arreglo
Unity Character Controller Version 1