Why is this code compiling successfully, without any warning:
int m,n;
cin >> m >> n;
int arr[m][n];
[compiled with MinGW with Code::Blocks]
Shouldn't atleast one of m or n must be constant at compile-time ?? I've seen variable length arrays accepted but they were all one-dimensional. Why is this two dimensional also being accepted ??
Moreover this is also running totally fine:
int arr[m][n][p];