Sorry, I actually didn't copy the code from the program, I just rushed it quickly. This is how it was:
Yeah the second example is quite stupid, but what I want is just the user to enter input, hitting return for a new line(I'm actually trying to avoid using fgets to be honest). Example :Code:#define ROWS 5 #define COLMNS 5 char array[5][5]; while(y < COLMNS) { fgets(array[i], ROWS, stdin); i++; y++ ; }
Enter chars:
1 . 4 a g
1 2 3 4 5
. . ! t x
a b c d e
5 4 3 2 1
Your array is:
1 . 4 a g
1 2 3 4 5
. . ! t x
a b c d e
5 4 3 2 1