I'm trying to use a fuction overload to display a int float and a double.
Seems it only wants to display a int.
Any help greatly appreciated
#include <iostream>
#include <conio.h>
using namespace std;
class show
{
public:
int OverloadedFunc(int a)
{
cout << a << endl;
}
float OverloadedFunc(float b)
{
cout << b << endl;
}
double OverloadedFunc(double c)
{
cout << c << endl;
}
};
main(int argc, char *argv[])
{
int OverloadedFunc(int a);
float OverloadedFunc(float b);
double OverloadedFunc(double c);
show a;
a.OverloadedFunc(10);
show b;
b.OverloadedFunc(20.00);
show c;
c.OverloadedFunc(30.0f);
system("PAUSE");
return EXIT_SUCCESS;
}