Null Pointer

This lesson highlights the key features of the null pointer.

We'll cover the following

Before C++11, 0 was often used to represent an empty or null value when the NULL macro was not applicable. The issue with the literal 0 is that it can be the null pointer (void*)0 or the number 0. This is defined by the context.

Therefore, a small program with the number 0 should be confusing.

Get hands-on with 1200+ tech skills courses.