In general overloading is used to identify when there is more than one signature for a given function name. Each such defined function is an overload of the function name. On the other hand override is present only in polymorphic (virtual
in C++) member functions, where a redefinition of the same signature in a derived method overrides the behavior provided in the base class.
struct base {
virtual void foo();
void foo(int); // overloads void foo()
};
struct derived : base {
void foo(); // overrides void base::foo()
void foo(int); // overloads void derived::foo()
// unrelated to void::base(int)
};
int main() {
derived d;
base & b = d;
b.foo( 5 ); // calls void base::foo(int)
b.foo(); // calls the final overrider for void base::foo()
// in this particular case void derived::foo()
d.foo( 5 ); // calls void derived::foo(int)
}