Trying to count how many elements within the array are not equal to 0, is something set up wrong?
I'd like to check all values in the array (it's a sudoku board) and then when all elements are "full" I need to return true. Is something off?
bool boardFull(const Square board[BOARD_SIZE][BOARD_SIZE])
{
int totalCount=0;
for (int index1 = 0; index1 < BOARD_SIZE; index1++)
for (int index2 = 0; index2 < BOARD_SIZE; index2++){
if(board[index1][index2].number!=0)
totalCount++;
}
if(totalCount=81)
return true;
else
return false;