35 How to access private members of the class | C++ Programming Tutorial for beginners | cpp | C pl
#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.
Видео 35 How to access private members of the class | C++ Programming Tutorial for beginners | cpp | C pl автора DevTalk
Видео 35 How to access private members of the class | C++ Programming Tutorial for beginners | cpp | C pl автора DevTalk
Информация
5 декабря 2023 г. 2:16:36
00:10:59
Похожие видео