What is difference between method overriding and method hiding in c++
Answers
Answered by
0
method overriding occurs when a base class and derived class contain member functions with the same name and signature,using an object of the derived class if u call the membr func ,the membr func of the derived class is called,that is, it overrides the member function of the base class
Method hiding occurs when there are more than one function with the same name and same signature(part of function overloading)
Similar questions
Computer Science,
6 months ago
Computer Science,
6 months ago
Physics,
6 months ago
English,
1 year ago
Math,
1 year ago
Math,
1 year ago