Two-dimensional array.

 

I'm trying to use a two-dimensional array, but I think I'm doing something wrong.

My (global) declaration is:

int LastExTime[2,4];

The problem is that LastExTime[1,1] keeps getting reset to zero and I'm sure it's not me doing it in code. I really can't see how it's happening - it works OK initially and then at some point becomes zero. I'm not redimensioning the array at all.

Also, am I right in thinking that in my array there will be eight items, and they are 0-indexed?

 

These lines of code seems to stop the problem -

if (LastExTime[1,1]==0)

{Print ("Gone");}

Is that possible? As if referencing the variable persuades my computer that I do still need this information?

 

Yes. Yes. Unlikely.

Of course, if you show us the code .. ALL the code .. you might get more meaningful answers.