Unwanted Loop

I go It thanks.
Last edited on

1
2
3
4
5
6
7
8
9
10
//to Call your functions:
easy();
medium();
hard();

//Not

void easy();
void medium();
void hard();


You also have a semi-colon after your "diff" if statement, so yeah, you'll always goto diff.
Last edited on
Ok so took out the "void"'s before my function call, but when i run it , there are build errors.
I use Microsoft Visual C++ Express 2010. It says :
1>------ Build started: Project: Game, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\hrikhu\documents\visual studio 2010\projects\game\game\main.cpp(18): error C3861: 'easy': identifier not found
1>c:\users\hrikhu\documents\visual studio 2010\projects\game\game\main.cpp(19): error C3861: 'medium': identifier not found
1>c:\users\hrikhu\documents\visual studio 2010\projects\game\game\main.cpp(20): error C3861: 'hard': identifier not found
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
So i took out the "{cout << "\n"; goto diff;}" line. Instead of the loop, the program just end.
I dont get it?
You should define the functions before you use them.
So just move the easy() medium() and hard() fuctions before tbe main()?
yes
Topic archived. No new replies allowed.