What we're being taught at school is this:
int x;
cin >> x;
int array[x];
OR
int x, y;
cin >> x >> y;
int array[x][y];
However, I am aware that it's invalid code in C++. But even if it is, it still does the job and works as expected, however, I'm looking to find the answer of how it's properly done?