Hello everyone. I'm am really new to C++ programming. I started about 2 days ago. The best way for me to learn is to learn as I go, but I have a problem. And I learn quickly by the way, as you will be able to tell from my code. So here is clip of my code.
if ((strcmp (userInput, stand) == 0) || (strcmp (userInput, STAND) == 0))
{
cout << "\nYou stand up!\n\nNow LOOK to see your surroundings!\n\n";
}
else
{
cout << "\nYou must use the STAND command!\n";
}
cin >> userInput;
if ((strcmp (userInput, LOOK) == 0) || (strcmp (userInput, look) == 0))
cout << "\nYou are deserted in the middle of a forest.\nYou hear birds chirping, but no other sounds are emitted.\nThere is a trail leading north.\n";
else
{
cout << "\nYou must use the LOOK command!";
}
Ok, so my problem is that I need my program to keep asking the user to "Use the STAND command please!" if they keep typing the stand command in wrong. When I type it in wrong, it returns "You must use the LOOK command!". Any ideas? Thanks.