I ported some code from Mingw, which I wrote using code :: blocks, for the visual studio and their compiler, it took a lot of errors so that the array sizes were constant! Why doesn't VS need a constant size, and mingw doesn't work?
eg.
const int len = (strlen(szPath)-20); char szModiPath[len];
the len variable is underlined in red to say its error and says "expected constant expression"
The only way I can get around this is ...
char* szModiPath = new char[len]; delete[] szModiPath;
Do I need to change everything to dynamic or is there any other way in VS?
Kaije source share