There is a code:
char field[3][3]; void enterX() { cout << "Enter X on vertical: "; int i; cin >> i; if (cin.good() && i < 3 && i >= 0) { } else { cout << "Please, enter the number 0-2!"; cin.clear(); cin.ignore(INT_MAX); enterX(); } cout << "Enter X on horizontal: "; int j; cin >> j; if (cin.good() && j < 3 && j >= 0) { } else { cout << "Please, enter the number 0-2!"; cin.clear(); cin.ignore(INT_MAX); enterX(); } field[i][j] = 'x'; } The task is to read the number of the array element from the console and insert the 'x' character in this place. However, if entered incorrectly, recursion does not occur. What is the problem?