c++11'de (bkz:
c++)
keyword olarak tanimlanmis ve pointer initialize etmek icin kullanilabilecek anahtar kelime.
(buyuk harflerle) null ile ayni isleve sahiptir, fakat null makro olarak tanimlanirken, nullptr, keyword olarak tanimlanmistir;
int main()
{
int *p1 = null;
int *p2 = nullptr;
cout << "addres of p1 : [" << &p1 << "], content of p1 : " << p1 << endl;
cout << "addres of p2 : [" << &p2 << "], content of p2 : " << p2 << endl;
return 0;
}
addres of p1 : [003bf840], content of p1 : 00000000
addres of p2 : [003bf834], content of p2 : 00000000