•include
<iostream>
using namespace std;
void Foo::print(int
a)
{
cout << "int a = " << a
<< endl;
}
void Foo::print(double a)
{
cout
<< "double a = " << a << endl;
}
On an instance "foo" of type
"Foo", calling
foo.print(5);
will output
int a = 5
whereas
foo.print(5.5)
will output
double a = 5.5