When I read some values from the user and I need to create an array of the specific size I do it somehow like this:
#include
using namespace
unsigned **numbers;
numbers = new unsigned*[a];
for (int i=0; i
It doesn't behave exactly like a 2d array, in that it's not contiguous in memory, but it will do. You can also use the notation numbers[i][j] to access elements.
Remember to delete[] each element of numbers at the end before delete[]-ing numbers itself
Using std::vector is probably a preferable solution, as detailed in other posts