Sub4Sub network gives free YouTube subscribers
Get Free YouTube Subscribers, Views and Likes

35 How to access private members of the class | C++ Programming Tutorial for beginners | cpp | C plu

Follow
tech fort

#How to access private methods/functions of derived class:

Ans: using virtual keyword

Programmer can call private function of derived class from the base class pointer with the help of virtual keyword. Compiler checks for access specifier only at compile time. So at run time when late binding occurs it does not check whether we are accessing/calling the private functions or public functions.

posted by nikudur