Thank you. It now compiles. And it works perfectly on my machine. However it still generates an error whenever I show it to somebody else:
Quote:
|
this application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
|
My code:
Code:
#include <Windows.h>
#include <tchar.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
MessageBox(NULL, _T("Hello!"),
_T("Hello World"), MB_OK | MB_ICONINFORMATION);
if (MessageBox(NULL, _T("I'm learning to use C++ to write native Windows programs. Cool, isn't it?"),
_T("Cool, No?"), MB_YESNO | MB_ICONQUESTION) == IDYES)
MessageBox(NULL, _T("You know it!"), _T("Sweet!"), MB_OK);
else MessageBox(NULL, _T("Jerk."), _T("Grrr"), MB_OK);
return 0;
}