A null pointer (nullptr) is a pointer that does not point to any memory location. nullptr is a keyword that was introduced in C++11 standard to denote a null pointer. This standard also introduced a nullptr_t type. The rest of this article dives into the reasons for introduction of the new keyword, looks further into nullptr, and provides some examples and a use-case.
Before C++11
Many of the features that C++ has, have been taken from C. In C a null pointer is defined as (void *)0. Which is...
Published on December 10, 2020 12:40