I have my program working for the most part except I don't want the program to quit working as soon as it finds a false statement but to ask me again to enter a password, so I was wondering if anyone can point me in the right direction to make this happen without messing up the program. Thanks in advance
ul hlho's while loop could potentially go on forever. Loops like that are often used with an if and a break statement in their bodies, for example:
1 2 3 4 5 6
while(true) {
//Stuff.
if (/*condition that checks if the loop should end*/)
break; //End the loop!
//Potentially more stuff.
}
In your case, the stuff and more stuff would be std::cout and std::cin statements prompting for the password and possibly telling you that you entered the wrong one.