Pointers should be initialized to nullptr (new in C++11) or an address of the corresponding type either when they’re declared or in an assignment. A pointer with the value nullptr
“points to nothing” and is known as a null pointer. From this point forward, when we refer to a “null pointer” we mean a pointer with the value nullptr
.
Error-Prevention Tip 8.1
Initialize all pointers to prevent pointing to unknown or uninitialized areas of memory.