Here I'd like to copy sudoku[][] to TempArr[][] but when I checked the values of TempArr[][], they are completely different. Why this is happening.Code:for (i=0;i<size;i++) { for (j=0;j<size;j++) { if(fscanf(ip_file,"%d",&sudoku[i][j])==1) { //copy to TempArr TempArr[i][j]==sudoku[i][j]; } else { perror ("fscanf failed on input file.\n"); // return error } } }
When I removed, and replaced with TempArr[][], its working.Code:if(fscanf(ip_file,"%d",&sudoku[i][j])==1)
Why this is happening and how to handle this situation.



LinkBack URL
About LinkBacks


