1
Off Topic / MultiDimensional Madness!!
« on: 2011-Dec-16 »
So apparently in java you can resize an inner array of a 2 dimensional array. 
Which I had no clue was even possible and thus, I ended up losing some points on my final in a cs class.
So the question is can you do this in Glbasic? Or for that matter c/c++?

Code: (glbasic) [Select]
public class Test {
public static void main(String[] args){
int [][] a=new int [4][5]; //Creating the initial array of 4x5
a[0]=new int[6]; //Resizing an array inside of the 2d array
System.out.println(a[0].length); //This will print 6.
System.out.println(a[1].length); //This will print 5
System.out.println(a.length); //This will print 4
}
}
Which I had no clue was even possible and thus, I ended up losing some points on my final in a cs class.

So the question is can you do this in Glbasic? Or for that matter c/c++?