my code here simply won't allow the user to type their input with the std::cin if the user types in a letter the first time and will be put into an infinite loop on the while loop due to the int remaining as wrong. Any help is appreciated to finding out how to make it allow the user to type in their input with the second std::cin is appreciated.
if (Current == 1) {
std::cout << "Text" << "\n\n";
std::cin >> Current;
while (Current != 2 && Current != 3) {
try {
if (Current == 2 || Current == 3) {
std::cout << "Correct" << "\n\n";
}
else {
throw 505;
}
}
Catch (...) {
std::cout << "Wrong" << "\n\n";
}
std::cin >> Current;
}
For reference Current by default is 1.