Yajnesh Narayan Behera wrote:
In this case the method is private in the derived class, so if we can call this private method from another class then what is the meaning of encapsulation in C++?
buddy that calling the method which is declared public in base class, though it pointing to the address of private method of derived class. static Binding and encapsulation are eligible till compile time, where compiler check daat integrity and language rule.. runtime check is not applicable in c++. thats why you could even call private member at runtime with twist!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixture
cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You/xml>