[Vala] Multidimensional arrays - help with using them.



Hello!
I need to use multidimensional array of ints, so this is what I do:

int[][] some_array = {}; //declaring an array of int[]
int[] some = {1,2,3}; // declaring array of ints
some_array += some; // adding this array to 2D array - this works

some_array[0] = some; // this doesn't work
some_array[0] += 2; //this doesn't work

Why those last 2 examples don't work?

What I need to do is to add some values to existing inner array of
multidimensional one (as in second non-working example).
How do I do that?

Leonti



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]