It will depend on how you set up the project. In VS2010, if I create a new project via File-> New-> Project, Visual C ++, Empty Project, then add a new C ++ file and copy your code, it compiles and works just fine.
, . , "" → "" → "" "Windows (/SUBSYSTEM: WINDOWS)
API- Win32 , Windows. Windows , , , , API . 16- Windows 3.1 1992 32- Windows 7.
:
, - > C/++ → , "", , ""
Properties- > Linker- > Input- > Ignore Default Libs No.