Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread JAIDEV YADAV
because Access control check is done at compile time while using virtual make fun not available to the base class pointer till runtime ... so no access check to derived class ... hope u understand and correct me to if there is any mistake ... On Mon, Aug 22, 2011 at 10:57 AM, Decipher

Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread Sanjay Rajpal
Here concept of v-tables comes into picture. Refer to C++ Primer Plus by Stephen Prata. Sanju :) On Sun, Aug 21, 2011 at 11:05 PM, JAIDEV YADAV jaid...@gmail.com wrote: because Access control check is done at compile time while using virtual make fun not available to the base class pointer

Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread Amit Mittal
This might help http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr130.htm \ On Mon, Aug 22, 2011 at 11:40 AM, Sanjay Rajpal srn...@gmail.com wrote: Here concept of v-tables comes into picture. Refer to C++ Primer Plus by

Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread sukran dhawan
which is the best book for c++ ? complete reference or prata or c++ by stroustroup? On Mon, Aug 22, 2011 at 11:40 AM, Sanjay Rajpal srn...@gmail.com wrote: Here concept of v-tables comes into picture. Refer to C++ Primer Plus by Stephen Prata. Sanju :) On Sun, Aug 21, 2011 at 11:05 PM,

Re: [algogeeks] Accessing private members of Derived class ?

2011-08-22 Thread Sanjay Rajpal
Stephen Prata C++ Primer Plus . Sanju :) On Mon, Aug 22, 2011 at 9:08 AM, sukran dhawan sukrandha...@gmail.comwrote: which is the best book for c++ ? complete reference or prata or c++ by stroustroup? On Mon, Aug 22, 2011 at 11:40 AM, Sanjay Rajpal srn...@gmail.com wrote: Here

[algogeeks] Accessing private members of Derived class ?

2011-08-21 Thread Decipher
class Base { public : virtual void show() { cout\n Base ; } }; class Derived : public Base { private : void show() { cout\n Derived ; } }; int main() { Base