What Jim says is right, but I bet I know what the problem is. You're using a main() function and no WinMain() function in a project you have started, which you chose to be a Win32 Application. You want a Win32 Console Application project instead. Win32 Applications start their execution at WinMain().