C++ int a[n] working in g++ but not with vs2008
===

I have the following code:

<pre>
...
int n;
cin &gt;&gt; n;
int numbers[n];
...
</pre>

It compiled with netbeans on mac using g++ (I think) and it didn't compile using vs2008 on windoze. Why is it so hard to make it work with every compiler? The size of the array is known before allocating it.