I thought size of arrays should be constant.I code in VS 2019 and even when I do something like this:
const int size = 5;
int number[size];
I will receive this error expression must have a constant value ,only alternative for using an integer directly for array size ,is using macro define ,otherwise I will receive error.
But in some IDEs like dev ,it is even possible to took size of array as input from user.I also saw people code's here with user defined array size.
So here is my problem :
is it right ,to do this? are there risks and problem for user defined array size?