DaMutation
Programmer
i've been trying to make a 2d array pointer with a variable size (something like int *x=new int[size] but with 2 dimensions). The closest i've gotten to this is using old C code making an array using malloc, making another array several times the size of that, and then use memcopy to get all the values in and out. As you can imagine, this is very annoying, especially since i read the entire array block several times in a function, and when accesing a specific piece of data it takes 3 lines of code just to get it!!! How can i get a dynamic 2d array where i can use the normal, everyday [][] syntax??