Jump to content

Null object: Difference between revisions

Made the C++11 example a subsection of C++
(Made the C++11 example a subsection of C++)
Line 187:
}
</lang>
----
=={{header|C++11}}==
 
=={{header|=C++11}}===
in C++11 there is nullptr of type nullptr_t this represents a pointer to an invalid place, you can use it to test like so
 
inIn C++11 there is <code>nullptr</code> of type <code>nullptr_t</code> thiswhich represents a pointer to an invalid place,. youYou can use it to test like so
<lang cpp>
int *p = nullptr;
Cookies help us deliver our services. By using our services, you agree to our use of cookies.