내 Sudoku Generator를 실행할 때 스택 오버플로가 27 회 발생합니다.27 회 실행 후 StackOverflow
void start(int todel){
int number;
for (int x=0; x<9; x++) {
for (int y=0; y<9; y++) {
number = GenN(x, y);
osudoku[x][y]=number;
}
}
replace(todel);
output();
}
int GenZ(int x, int y){
int number;
bool duplication = true;
Randomize();
number = Random(9)+1;
duplication = check(number,x,y);
if (duplication==true){
return GenZ(x,y);
}
else if (duplication==false) {
return number;
}
}
나는이 코드로 뭔가 생각합니다.
758 431 629
913 267 485
642 985 317
Stack Overflow
그래서 내가 1/3 스도쿠를 얻을 : 이 같은 일을 생성합니다.
사용 언어로 태그하십시오. – Dukeling
스택 트레이스 제공 –
뭔가에 'number'를 지정하면 안됩니까? 'zahl '은 어디서 오는거야? – Thilo