Function overloading - it is a feature of c++ that allows us to create multiple functions(many functions) under the same name but the only thing is that they want to have different parameters
#include<iostream>
using namespace std;
void print (int x)
{
cout<<"the integer no is"<<x;
}
void print (float x)
{
cout<<" the float number is "<<x;
}
int main()
{
int a;
float b;
a=45;
b=5.55;
print(a);
print(b);
...
Wednesday, May 28, 2014
Subscribe to:
Posts (Atom)