I wrote the following code for microsoft
Visual C++ 6.0, but I get the
error(listed below). How do I fix this? is this wrong code? Is the
book I am using wrong?
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hprevInstance, LPSTR
lpCmdLine, int nShowCmd)
{
MessageBox(NULL,"\tHello, world!","moo",NULL);
return 0;
}
--------------------Configuration: Cpp3 - Win32
Debug--------------------
Compiling...
Cpp3.cpp
d:\programming\cpp3.cpp(4) : warning C4007: 'WinMain' : must be
'__stdcall'
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/Cpp3.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Cpp3.exe - 2 error(s), 1 warning(s)