At last, C++ has a keyword that designates a null pointer constant.
nullptr replaces the bug-prone
macro and the literal 0 that have been used as null pointer substitutes for many years.
void f(int); //#1
void f(char *);//#2
f(0); //which f is called?
f(nullptr) //unambiguous, calls #2
is applicable to all pointer categories, including function pointers and pointers to members:
const char *pc=str.c_str(); //data pointers
int (A::*pmf)()=nullptr; //pointer to member function
void (*pmf)()=nullptr; //pointer to function