SERIOUSLY ANNOYING PROBLEM!!!

Ok... so I am doing a program where you should enter a number that's not a 5 and you can't enter the same number twice. Everything seems to work fine but when I call the function "game" it wont do it. Anything I did wrong or am I jus high or something?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  #include <iostream>

using namespace std;

int game();

int main(){
    cout << "This is random text..." << endl;
    int game();
}

int game(){
    //I have a while loop and some other random stuff like if ststements in here   
}
On line 9, that's not calling a function. That's a function declaration.

I have no idea whether you're high.
Well how do I do to call a function then? No, hopefully I am not high.
I recommend you go back to your textbook and read up on this. The syntax for calling a function is crucial to programming in C and C++, so you'd be better off making sure you've properly understood it.
Yeah.. I forgot, I'm a bit tired right now:) Anyways Thanks so much for the help.
From a very confused idiot from sweden:)
Remove the int from in front of the function name.
1
2
 
  game();


http://www.cplusplus.com/doc/tutorial/functions/
Topic archived. No new replies allowed.