Hi, I'm a C/C++ beginner and I can't get any API calls to run (I have previously used API with VB). Here is a sample code that won't work :
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
return 0;
}
I get the error unresolved external _main reference. I tried Borland C++ 5.02 and Microsoft Visual C++ 6.0. It compiles on both but I get the error when I run it.
Please help me.
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
return 0;
}
I get the error unresolved external _main reference. I tried Borland C++ 5.02 and Microsoft Visual C++ 6.0. It compiles on both but I get the error when I run it.
Please help me.