Fatal Error using MVC++

I’m trying to compile a program and is taken directly from a textbook. It compiles just fine, and then i get the following errors:

LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Does anybody know what the external symbol _WinMain@16 is? Any information would be great. Thanks!

You are compiling a console application as a Windows application. The easy fix is to go to the linker project settings, scroll through the stuff at the bottom, and change the subsystem entry from windows to console.