I read that array size needs to be known at compile-time. However, when I do this, it compiles and runs just fine without giving any errors...how come?
#include <iostream>
int main() {
int size;
std::cout << "Enter size: ";
std::cin >> size;
int a[size];
return 0;
}