Difference between Overloading and Overriding?
Answer Posted / manu chaudhary
overloading- having different functions with same function_names but must have different signatures(parameters).
overriding- if a base class have a member function and its derived class also have a member function with same name and signature then when that same name function is called in the main function with the object of derived class then the function in the derived class is called that means the function with sam ename in the base class overrides, and this is known as function overriding.
If you have to call the function of the base class then you can call it within the scope of derived class function by using ::(scope resolution) operator.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are virtual constructors/destructors?
What is private public protected in c++?
Do vectors start at 0 c++?
What is a lambda function c++?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
Where do I find the current c or c++ standard documents?
What is dynamic and static typing?
Explain the difference between struct and class in terms of access modifier.
What is abstraction c++?
What is the advantage of c++ over c?
What is the difference between cin.read() and cin.getline()?
What is stl containers in c++?
What is the difference between containment and delegation?
Why do we use constructor?
Why namespace is used in c++?