C++ Blog

Null Pointer and C++

Posted in c++0x by Umesh Sirsiwal on January 5, 2009

This is part of C++ Reference series.

C++ is a strongly typed language except when it comes to null pointers. 0 is used both to represent a null pointer and integer value zero. This can cause nasty issues since 0’s type cannot be determined. C++0x adds a new reserved word nullptr to solve this issue.

nullptr is zero pointer that can be converted to any pointer type.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: