I wanted to create an array before int main() function, but compiler didn't allow this. I tried this:
Another q: why g++ allows declaration of arrays inside int main() without exact value, but Visual C++ 2005 doesn't? It demands some integer values:
How can I make it work in Visual C++ 2005 before calculating temp_size?
Code:
size_t temp_size; int varArray[temp_size];
Code:
int varArray[temp_size]; //g++ int varArray[200]; //Visual C++ 2005
Comment