[LC++]Null or 0

Peter Poulsen peter_poulsen at stofanet.dk
Sun Feb 22 23:14:01 UTC 2004


I have read that we should use 0 over NULL when setting a pointer to
"nothing".

Does anybody know why? To me it seems better to use NULL as it indicates
in the code that this is a pointer being set to nothing, and not an
interger being assigned the value 0.

I am aware that in most compilers NULL is just a macro for 0.

-- 
Yours 
Peter Poulsen




More information about the tuxCPProgramming mailing list