I'm trying to make program that generate random SUDOKU, but i'm new to C++, so i don't know how to use 2 Dimensions arrays in function to check is everything correct. could you help me please? squares are eapty, cause i need to rewrite it. i didn't understand the cherno multi-dimensions arrays
fullcode: https://pastebin.com/nc6Dagbh
stop=CheckEverything(*table, random,column,row);
bool CheckEverything(int *table,int random,int column,int row){
if (CheckRows(*table, random,column,row) && CheckColumn(*table, random,column,row) && CheckSquares(*table, random,column,row)) // if everything is true
return true; // everything is true
else // if not
return false; // it's not
}
bool CheckRows(int *table, int random,int column, int row){ // Check unique values in a row
for (int counter = 0; counter < row; counter++) {
if (random == table[counter][row]) // if there were value like actually random number
return false; // find new value
else // if there weren't
return true; // else it's correct
}
}