4 Aug
2006
4 Aug
'06
2:04 p.m.
Hi Kassen!
I have a slight issue. I'd like to have a array in which every object itself is a array. Particularly I'd like to have one of 8 locations each of which holds a array of length 32.
I tried this;
int[32] memory[8];
You should be able to do this using a two dimensional array: int memory[8][32]; You can treat this as a matrix or as an array of array. To get the 0th array: memory[0] Should be of type int []: memory[0] @=> int array[]; You can do this up to arbitrary dimensions, just make sure the dimensions add up (the type checker shall complain if they don't). Hope this helps. Ge!