Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
property and synthesize
#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; [George print]; [George release]; [pool drain]; return 0; }
run
|
edit
|
history
|
help
0
C# Truly Random
Counter-Strike Global Offensive Steam
Overriding call parent & child class
scanf1
Q-2 dotnet
Project Euler Problem 11
Get Error Message Based on String
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( optimized version ) ♦
Fórum ➡ Border of a string S with at least 3 non-overlapping solutions ( yield version ) ♦
Battle Algorythm