Using OnlineGBD, online g++ compiler I could use the: int arr[size]; syntaxis creating an array, but it doesn't work on the Visual Studio compiler. It says the variable should be a constant. Can someone please give me the syntaxis for the VS method? And explain the reason for this big difference between compilers.
Tried making the size variable a constant, but nothing worked.