So i'm making a stupid little game( i'm a beginner)
I want to make it so that if the user inputs something wrong it will just loop back around, so they can enter it again.
any suggestions are welcome thanksCode:int whereToGo; do { cin >> whereToGo; if(whereToGo == 1); { cout << " You go outside and you are stopped by a guard.\n"; cout << " He asks you to go on a quest for him"; } else { if(whereToGo == 2); cout << " You have chosen to stay and look around\n"; cout << " You look around the castle is made of marble\n"; cout << " There are wealthy people all around you\n"; } } while (whereToGo < 3);![]()




Reply With Quote