+ 1

Can we give a variable size to a 2D array in c++

I need to use it to make a grid with defined width and changing length , how can I do it

14th Jan 2020, 12:15 PM
Anvi Jain
1 Resposta
+ 3
If you don't wanna fixed size 2d array you can use vector of vectors: std::vector<std::vector<int>> someArray;
14th Jan 2020, 12:33 PM
Jakub Stasiak
Jakub Stasiak - avatar