I just bought a book on game programming with c++ and one of the first things you do is make the "Game Over" console program. I'm using Microsoft Visual c++ 2012 Express. I follow what the book says and type in the code for the program. The code:
I tried making a whole new file and typing the code in again and it still does this. I'm using the Win32 Console Application template as that it was the book told me to use. Can anyone help me as to why it's failing?
Update: I fixed the problem. I just had to install SP1 for VC.
The easiest way is to press ctrl+shift+A, this adds either a new or existing item to your project.
Try adding a new .cpp file to your project, then copy and paste your code. After that try compiling it again.
If that doesn't work, try creating an empty project, then doing the steps provided above.
Heres the deal, Win32 Console is different from console, and a Win32 application. When you set the compiler up, it looks for a specific memory address which matches the signature of the main function (more specifically a call style). So you have to be somewhat accurate when describing these things to VC++. Its easiest to just open an empty project, and add your stuff as you go.