VIRTUAL FUNCTION IN C++
A C++ virtual function is a member function in the base class that you redefine in a derived class. It is declared using the virtual keyword.
It is used to tell the compiler to perform dynamic linkage or late binding on the function.
Virtual function का use हम जब करते जब हमें दो derive class के variable की एक ही copy लेना हों।
Bonus Learning—
- Class data member और user define data होता है।
- Class access करने के लिए हम object बनाते हैं।
- हर data member अपने object की copy रखते हैं।
Comments
Post a Comment
Please Subscribe and Comments my blog site.