Guest_imported
New member
- Jan 1, 1970
- 0
I need a dynamic multidimensional array, but I get compile time errors trying to declare it.
These don't work for sure.
Square *test = new Square[number_of_rows][number_of_collumns];
Square test[][] = new Square[number_of_rows][number_of_collumns];
Square (*test)[][] = new Square[number_of_rows][number_of_collumns];
if I declare it single diminsional, and try to use it double dimensional, that doesn't work either. I know I could convert manually, but I am doing a lot of stuff and I want the code to be as readable as possible. Thanks
These don't work for sure.
Square *test = new Square[number_of_rows][number_of_collumns];
Square test[][] = new Square[number_of_rows][number_of_collumns];
Square (*test)[][] = new Square[number_of_rows][number_of_collumns];
if I declare it single diminsional, and try to use it double dimensional, that doesn't work either. I know I could convert manually, but I am doing a lot of stuff and I want the code to be as readable as possible. Thanks