2-D Array, initialzing problem

Have a problem initializing my arra with '*' and then when I cin a X should be put in that row and column of the array.instead I get 42 for the '*' and 88 for the 'x'

here is part of my code.

int main()
{
int row;
char seat;

for (row = 1; row < 13; row ++)
for (col = 1; col < 6; col++)
matrix[row][seat] = '*'
.......
I've tried putting this code before and after a switch statement so the char is changed to a number but still can't get to work.
What type is "matrix"?
i have it as
int matrix[13][6];
changed it to char matrix

anyway to store the value of the matrix?
What do you mean?
 
matrix[0][0] = 1;

matrix[row][seat] = '*'

should be

matrix[row][col] = '*'

col is not declared
As JG05 says declare col.
But....it is the col part of the matrix that prints the *
Topic archived. No new replies allowed.