I am very new to C++ and I am wondering if I can do the following,
int a =5;
int b[a];
If so, what would happen if value of a changed? and any drawback using this.
If not,why it that?
thanks!
I tried the same code on an online c++ compiler and it does work. but i just dont know if this is a standard practice or not. if not, what would be the standard practices of refering a dynamic value to initialize an array?