It appears that your project is set as a console application but your code entry point is WinMain which is the entry point for a Windows GUI application. You can see that the linker error relates to an unresolved external symbol for _main which is the entry point for a console application. I'm guessing that you created an empty project and then added your code to it.
Either create a Windows desktop application from the New Project templates or go into your existing project's property settings for the linker to /SUBSYSTEM:WINDOWS as shown here (make sure to change the setting for all platforms and all configurations)
If you really want a console application then change the code so that the entry point is main, not WinMain.