Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) nullptr

 

nullptr is a keyword that has different meanings, depending on the standard used:

 

 

 

 

 

C++98 nullptr in the C++98 standard

 

nullptr is not supported in C++98.

 

 

 

 

 

C++0x nullptr in the C++0x standard

 

 

nullptr is a keyword to indicate an unitialized pointer.

 

int main()
{
  char * c = nullptr;
}

 

Technical note: the code shown did not compile using the G++ 4.4.5 compiler, which is supplied with the Qt Creator 2.0.0 IDE, but is expected to compile in G++ 4.6 [1].

 

 

 

 

 

References

 

  1. GCC page about C++0x support

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict