What is the preferred way to check for a Null pointer in C++?
Options A: if (NULL == pSomethingColumn) // Yes, we use Yoda conditions if (NULL != pSomethingColumn) Or if (pSomethingColumn) if (!pSomethingColumn) I am looking for references explaining the reasoning as well. I have heard some people say that technically NULL does not have to be defined as 0 , but come on! if that was the case, then the sucker (our app) would crash in -2147483648 different ways. So, if NULL != 0 , then we will have big problems. Please help me settle a pointless syntax debate. I am not particularly attached to either way; just looking for the official way. Thanks. P.S. We