R
red floyd
I searched the FAQ on this one, couldn't really find an answer.
Stylistically, is it better to use 0 or NULL?
I know that pre-Standard, 0 was recommended, because some compilers
implemented NULL improperly.
However, 18.1/4(footnote 180) indicates that 0 and 0L are valid NULLs,
while (void*)0 is explicitly invalid.
So, assuming a (reasonably) Standard compliant compiler, is there a
reason to continue to prefer 0 over NULL? NULL would seem to have the
advantage of indicating that we're checking a pointer.
Also, did nullptr make it into the C++0x draft?
Stylistically, is it better to use 0 or NULL?
I know that pre-Standard, 0 was recommended, because some compilers
implemented NULL improperly.
However, 18.1/4(footnote 180) indicates that 0 and 0L are valid NULLs,
while (void*)0 is explicitly invalid.
So, assuming a (reasonably) Standard compliant compiler, is there a
reason to continue to prefer 0 over NULL? NULL would seem to have the
advantage of indicating that we're checking a pointer.
Also, did nullptr make it into the C++0x draft?