Re: using literal zero for NULL




On Mar 21, 2006, at 4:21 AM, mikecorn wrote:


Thanks. I am using c++ so I must use protptypes. I use -Wall also.


For C++, 0 is supposed to be preferred over NULL. For varargs, though, the compiler might not know your intent. I've seen places that state modern compliers treat NULL as exactly 0 (in which case static_cast<void*>(0) should do the trick), however you should probably check on a C++ newsgroup for details.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]