Under GCC 4.8.1
static int len = 10;
int main() {
int a[len];
return 0;
}
can compile success.
But compile will fail if changed like this:
static int len = 10;
int main() {
static int a[len];
return 0;
}
But in my Visual Studio, the former also can not compile success. How can I fix this problem? And is there a way to change latter one to make it compile success?