this is part of a code I wrote for my c++ homework that let's the user specify the array size. For some reason it worked for me in XCode but it didn't work for my instructor in Visual Studio and I lost 15 points :\
int variableArraySize;
cout << "How long is your array?" << endl;
cin >> variableArraySize;
int const constArraySize = variableArraySize;
int myArray[constArraySize];
Why did that happen? And do you think I should tell her to increase my grade or it's my fault cuz we should be using Visual Studio?