while (complete == false)
{
int numPossible = 0;
complete = true;
for (int j = 0; j < 9; j++) // this one runs through the row
{
for (int k = 0; k < 9; k++) //this one does the column
{
cout << k;
if (board[j][k] == 0)
complete = false;
computeValues(board, possible, j, k);
for (int i = 0; i < 9; i++) // this runs through a bool indicating if each
//i is true (possible) or false
if (possible[i] == true)
numPossible++;
if (numPossible == 1)
board[j][k] = possible[0];
}
}
}
Every single time I run through the while loop I reset complete to true, and it only gets set to false (I think) when I find a 0 in the sudoku puzzle, meaning its not complete yet.
I just realized, in the line before return, I was setting board[j][k] to whatever was in possible[0]. Possible is a bool, I want numbers in the board not bools. So I reset it to possible[i] and im still finding myself in an infinite loop.