If I am declaring a private member in abstract class, although it will not be accessible in derived classes and can not be accessible by instantiating the abstract class. Then what is the optimal use of declaring private member in an abstract class.

Questions by ambrishg

Showing Answers 1 - 2 of 2 Answers

Krishna

  • Mar 20th, 2006
 

It can be accessed with the help of friend function

  Was this answer useful?  Yes

Yashwant S pinge

  • Mar 27th, 2006
 

Hello,1) You can access the private data of abstract class by using the public function of abstract class . That means you can create the object of derived class and using this object , you can access the private data by invoking the public function of abstract or base class.2) Using friend function.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions