I'm using VS 2019. In this code:
using namespace std;
int main()
{
    cout << "Inserisci la dimensione della matrice:";
    int DIM;
    DIM = 2;
    cin >> DIM;
        int v[DIM][DIM];
    return 0;
}
I Don't understand why in:
int v[DIM][DIM]; 
I've this error:
The expression must have a constant value. It is not possible to use the "DIM" variable value as a constant.
 
     
    