Many people change compilers, or re-use code on different projects that use different compilers. When you try to use that code on another compiler that doesn't support non-constant array sizes, it won't work. Also, when you post it on a website like this, only people with g++ will be able to run and test your code without making changes.
The gcc compiler allows it for a reason, so if you know you are only going to use g++ and you don't plan on using this code much elsewhere, then it is perfectly acceptable to take advantage of the feature. Besides, it might even be added to the C++ standard in the future.
A vector is better than a C style dynamic array because it encapsulates the memory management and provides a safer interface than plain arrays.