int n;
cin >> n;
const int size = n;
int arr[size];
I'm getting a compiler error message "Expression must have a constant value". I'm using visual studio 2013. But the array size is a const int
, whose value does not change. How am I getting a compiler error?