Funtion over loading is yet another feature of polymorphism.Diff functions with the same function name but diff arguments are defined in a class.During compile time the appropriate function is called dep on the arguments passed.Eg:
class area
{
int sq l b;
float r;
public:
draw()
{cout<< no shape };
float draw(float );
int draw(int );
int draw(int int );
};
float shape:: draw(float cir)
{
r cir;
return(3.14*r*r);
};
int shape::draw(int sq)
{
return(sq*sq);
};
int shape::draw(int l int b)
{
l (a+b);
return(2*l);
};
so dep on the arg passed we get the area of circle square or rectangle.