you know the Stroustrup says:"..you cannot initialize an array with a non constant expression" or something like this.
Well, i'm on a mac and i use XCode to compile my c++ projects.
Can you explain me why the hell i'm able to compile without ANY errors and with the correct output, the following code??
- Code: Select all
std::cin >> size;
array = size;//just to test
std::cout << array;