Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
simple inheritance in objective c
#import<Foundation/Foundation.h> @interface Abhi:NSObject{ int a; } -(void)setValue; @end @implementation Abhi -(void) setValue{ a=10; } @end @interface Deshmukh:Abhi{ } -(void)printValue; @end @implementation Deshmukh -(void)printValue{ NSLog(@"inherited value is :%i",a); } @end int main(int argc , char *argv[]){ Deshmukh *d=[[Deshmukh alloc]init]; [d setValue]; [d printValue]; [d release]; return 0; }
run
|
edit
|
history
|
help
0
objective c fibonanci
HAL is IBM
Program 2.2
Strings
arary
Class implementation
Az Flights Optimization
book
Class implementation using get method
Etudiant.h