I'm allocating memory for a 8X8 char array:
then try to assign a character from a char array to each column in the first row game[0][0] = r, game[0][1] = b and so on...Code:char **game; game = (char**)malloc(8 * sizeof(char*)); for(i = 0; i < 8; i++) game[i] = (char*)malloc(8 * sizeof(char));
Code compiles with no errors but the cmd line crashes when I run the program. Any thoughts?Code:char myArray[8] = "rbnqknbr"; i=0; for(int j=0; j<8; j++) game[i][j] = myArray[j];