I'm writing a very simple program, but I keep getting the same error, no matter what I do. What is it that is going wrong? It says I can't use the variable as a function.
Here is my code:
I feel like its a simple fix... help!
Here is my code:
Code:
#include <iosrteam>
using namespace std;
int what;
int main()
{
int what;
cout << what(9,3,17) << endl;
}
int what(int x, int y, int z)
{
if(x>y && x>z)
return x;
if(y>x && y>z)
return y;
if(z>x && z>y)
return z;
else
return 0;
}
Comment