What do you mean by inheritance in real life? The child gets what his parents have if they let him have it. That is the same in programming too.
If you have a class A, whose child is class B, class B gets the things class A that has been declared public or protected by the programmer. Anything declared private will not be inherited.
WolfPack
Postaholic
2,051 posts since Jun 2005
Reputation Points: 572
Solved Threads: 115
Y dont u search in web. U can get tons of material related to inheritance.
Just give the string "Inheritance tutorials"(google)
dilip.mathews
Junior Poster in Training
89 posts since Jun 2006
Reputation Points: 16
Solved Threads: 3