Overloading - Two functions having same name, but with different type and/or number of arguments. There are two types of overloading function overloading and operator overloading.
Overriding - When a function of base class is re-defined in the derived class.
overloading must have different method signatures where
as overriding must have same signature.
Example:
class A
{
void OverloadedMethod(int a);
void OverloadedMethod(float a);
void OverloadedMethod(int a, int b);
void OverloadedMethod(float a, int b);
};
class Base
{
virtual void OverridenMethod( int a);
};
class Detived : Base
{
virtual void OverridenMethod( int a);
};
Edited by Aescleal: Tidied up the syntax so it'd compile and removed an innacurate statement from the blurb at the start (return types play no part in overload resolution so overloaded methods don't have to return the same thing).