I use visual studios c++, and whenever I try to run even the most simple program, it says "the project is out of date. Would you like to run?" I click yes, and it says there are build errors, even though there arent.
You have a divide by zero, so I'd expect it to crash.
What version of Visual Studio are you using? They're not perfect when deciding what to build, so you could have a problem after having done everything correctly.