int *p = nullptr; ... if (p == nullptr){ // do some thing } //or just if (p){ // do some thing }