I always think simply if(p != NULL){..} will do the job. But after reading this Stack Overflow question, it seems not.
if(p != NULL){..}
So what\'s the canonical way to c
Well, this question was asked and answered way back in 2011, but there is nullptrin C++11. That's all I'm using currently.
nullptr
You can read more from Stack Overflow and also from this article.