Initialization problem
-
Hello,
I have got a problem with an initialization.
#define TAB 1000 int table_collision [][TAB]; void function() { for(int i=0;i<2;i++) { for(int j=0;j<TAB;j++) { table_collision[i][j] = 0; } } }
When I look each value I see that the initialization doesn't work. For example table_collision[0][0]=20125560
table_collision[0][1]=20133568
table_collision[1][103]=1429512
there are other values that are 0.Can anyone help me?
Thank you in advanced!
-
What means ?
int table_collision [][TAB];
What is the first dimension's size?
-
I had proved with
int table_collision [2][TAB]
and without it, but it doesn't work in any case.
and the values are the same.
-
I am trying another way of doing it with vectors.
Thank you so much for your time!!