Re: [Dev-C++] Differences in compilers
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Jason H. <jas...@bt...> - 2002-04-14 13:36:55
|
Try writing NULL in all caps. AFAIK most definitions of NULL are done =
all in upper case letters. If I remember correctly NULL is normally =
defined thus:
#define NULL (void*) 0;
Although that could be wrong. In the end all NULL are effectivly zero in =
one form or another.
Jason.
----- Original Message -----=20
From: Danny Austin=20
To: dev...@li...=20
Sent: Sunday, April 14, 2002 2:59 AM
Subject: [Dev-C++] Differences in compilers
Hey guys this is probably a really stupid question but I got a problem =
I feel is totally compiler related. I'm still using a book called "C++ =
PROGRAMMING for the Absolute Beginner," and its compatible with a =
compiler called "CODE WARRIOR". I have typed out a very simple code for =
Windows 32 apps and I have an error "NULL not declared," and below is =
the code. I was just wondering what I might have to adjust or keep in =
mind when dealing with different compilers because the author figures =
this will run no problem.=20
#include <windows.h>
//win32 entry-point routine
int WINAPI WinMain(HINSTANCE hInst,
HINSTANCE hPreInst,=20
LPSTR lpszCmdLine,=20
int nCmdShow)
{
MessageBox(Null, "Windows Programming is Easy!!",
"My First Message Box",
MB_OKCANCEL | MB_ICONINFORMATION);
}
|