Last Updated: May 17, 2026
nullptr is the C++11 keyword for "this pointer points to nothing". It replaces the older habits of writing 0 or the macro NULL, which both predate C++ and cause real bugs once function overloading enters the picture. This chapter covers what nullptr is, why it exists, how it compares to its predecessors, and the small set of idioms that go with it.