int main()
{
short choice;
cout << "Please type 1, 2 or 3 for either an int, long or floating caculation";
cin >> choice;
if (choice = 1);
{
if (choice = 2);
{
if (choice = 3);
{ average(floatfloat);
}
average(long, long);
}
average(int, int);
}
else
cout << "error";
return 0;
}
Your if statements do nothing anyway - that semi-colon you've put on the end of them is the end of the code that gets run if the statement passes. You need to go back and read about if statements again.
average(float float);
I presume you meant average(float, float);
which makes no sense anyway.
What do you think this should do? It makes no sense. If you want to call a function, you have to create the values to pass into it, and then pass them in. For example,