I want the program to initialize the 6x24 array with the pattern and display a static image on the console screen upon startup. And the six user control commands have to be ‘w’ for upward rotation, ‘s’ for downward rotation, ‘a’ for leftward rotation, ‘d’ for rightward rotation.
But when I run it, it doesn't work and shows me errors in line 11,22 and 34. And I'm having a feeling I'm doing this wrong.
for(int i = 0; i < x_index; i++)
{
for(int j = 0; j < y_index; j++)
{
// this will NOT require ENTER key after the input to make it effective
if(_kbhit()) //if a keyboard hit is detected...
{
cmd = _getch();
printf("%d , BigArray[i][j], cmd);
}