Need help understanding games in C++
I have been trying to write a simple text adventure program using if statements and functions. When I run the program it always reruns the program from the start. Also one of the commands should be exit to exit the game how is that done.
This is what I have but it is not working.
cout << "press any key to continue....\n";
cin >> direction;
if (direction = "r" || "R")
if (direction = (char) exit)
the other problem in main - it loops back through
void main ()
I'm very new at this and very confused. If anyone has any suggestions it would sure help.