When I run my program it ignores the cin and goes into an infinite loop. It acts as though the cin.ignore() isn't working.
int getInput(int tries){
int numGuess = 0;
cin >> numGuess;
cin.ignore();
validate(numGuess, tries);
return 0;
}
int validate (int input, int tries){
if (input <1 || input >100){
cout << "Please enter a decimal integer between 1 and 100: ";
getInput(tries);
}
return NULL;
}