What does it mean to rewrite, reload and hide C++ respectively?
Many novices are not very clear about what it means to rewrite, reload and hide C++. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
Rewrite
Definition of rewriting: rewriting occurs in the inheritance relationship between the base class and the derived class, and the base class member function defined as a virtual function is redefined and implemented by the derived class. At the same time, the method of the base class is hidden (that is, when the derived class calls the override method, the derived class redefines the method instead of the base class method). For example:
# include using std::cout;using std::endl;class Base {public: Base () {}; ~ Base () {}; virtual void fun () {cout