Nowadays, with C++11, Whats recommended to use, Zero or NULL? The first of the second if?
Zero
NULL
int * p = getPointer(); if( 0 == p ){ //
C++11 has a new literal keyword nullptr. It's better than 0 or NULL for things like this because there's no chance it will be used as an int in overload resolution.
nullptr
0
int
if ( nullptr == p )
Or of course you can just use a pointer in a bool context:
if ( !p )