I am getting this error even though my function is void? I thought the error only happens to non-void functions. Thanks in advance.
void scramble(void)
{
char newgrid[DIMENSION][DIMENSION];
for(int i=0; i<DIMENSION; i++){
for(int j=0; j<DIMENSION; j++){
newgrid[i][j] = grid[i][j];
}
}
for(int i = DIMENSION-1; i>=0; i--){
for(int j = 0; j<DIMENSION; i++){
printf("%c", newgrid[i][j]);
}
}
}
in the inner “for” loop, shouldn’t that be j++? You’ve made an infinite loop.