Quote:Original post by Jaywalk
I disagree (slightly) with what you say. '\0' is 0, but NULL usually isn't even defined, so writing '\0' could be considered even "better" that NULL.
Hey, it's the ninth anniversary of the C++ standard today (it was November 17, 1997 when the became, uh, became the standard).
I would think by now people would have realized it exists.
A quick glance at section 17 shows that not only is NULL required, but it is required to be a macro defined to have the value zero (0).
Dr. Stroustrup prefers the use of an explicit zero. Others, mostly from a C background, prefer to use the macro. C++0X will deliver the keyword nullptr to enable the schizsmatics to start another religious war.
Me, I'm fine with NULL. I'm uncomfortable with '\0', since that's explicitly a character value from the implemetation set (again, read your copy of the standard) and clearly not a pointer value, but it will work.