Run Code
|
API
|
Code Wall
|
Users
|
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
Please
log in
to post a comment.
book
find simple Interest in objective c
bookinheritence
NSArray Method Exercise
Even numbers are at the beginning and all the Odd numbers
linear hybrid cellular automaton reversible random bit generator
find maximum in objective c
Obj-C_Program_Structure_1
NSSet Program in objectice-c
string
Please log in to post a comment.