Does anyone know why Visual Studio is the only compiler to giving me this error - Expression must have a constant value (referring to size).
#include
The reason this is only happening with VC++ is that VC++ is (apparently) the only compiler you've tried that conforms to the C++ standard in this respect.
For some time, C has had a feature known as "variable length arrays", that would allow this. Some C++ compilers (especially gcc) also allow them in C++ (at least by default), even though the C++ standard prohibits them.
If you want something that acts like an array, but also allows you to specify its size at runtime, you usually want an std::vector
instead of an array.