I've used the i value of the array in the next loop, so what am i doing wrong ? Another error says TicTac.c:27:15: error: array type 'int [3]' is not assignable Matrix[i,z] = h,v; Thank you so much, and sorry if i ask my question in a wrong way. it is my first question in here. Thank you so much !
{ /*The tic tac board*/
int Matrix[3][3] = { {6,6,6},
{6,6,6},
{6,6,6} };
/*asks user for input and gives value into the array*/
for (int z = 0; z <= 2; ++z) {
for ( int i = 0; i <= 2; ++i)
{
printf("Give me your choice in the horizontal layer");
int h = GetInt();
printf("Give me your choice in the verticle layer");
int v = GetInt();
Matrix[i,z] = h,v;
/*demonstrates the board*/
for(int o = 0; o <= 2; o++)
{
for(int j = 0; j <= 2; j++)
{
printf("%d ", Matrix[o][j]);
printf("\n");
}
}
}
}