What is the Difference between Overloaded Functions and Overridden Functions ?
October 28, 2007 · Filed Under C++ Questions, Placement Questions
![]() Don't want to miss a single bit? Subscribe By Email for Daily Jobs |
In C++, overloading is simply the use of the same function identifier for different functions declared in the same scope.
E.g.
void display (int);
void display (string);
The above two functions are clearly overloaded. The compiler will distinguish among them by the actual argument used in the call to display.
Overriding can occur only in the presence of a base class virtual function. Overriding has nothing whatsoever to do with overloading. A nonvirtual base class function cannot be overridden, only hidden. In overriding the function prototype in the derived class has to be exactly the same as the one in the base class
Related Articles
- What are Virtual Functions ? Why do we need Virtual Functions? Explain with an example.
- What is Function Overloading in C++ ?
- What do you mean by “Pointers to Function”? What are Function Pointers ?
- What is a Pure Virtual Member Function ?
- What is Operator Overloading in C++ ?


