I'm new to C++. I heard that dividing by 0 leads to a run time error, but when I tried it, it threw me a compiler error C2124 and didn't create an object file, so does the compiler automatically run the code to see whether it's executable before creating an object file? (I'm using Visual studio community btw)
int main() { int a = 9 / 0; }