Stephan T. Lavavej: Everything you ever wanted to know about nullptr

  • Posted: Oct 19, 2009 at 9:39 AM
  • By: Charles
  • Avg Rating: 4.5

    (8)
  • 47,672 Views
  • 10 Comments

Download

Right click “Save as…”

Embed code for this video

Copy the code above to embed our video on your website/blog.

Close

Video format

Note: These selections will fall back to the next best format depending upon browser capability.

Close

In C++, 0 is an abused integer. It is used to reflect, well, 0 as a value of type int and it is also used to represent a null pointer... The latter has led to many bugs and confusion over the past 30 years. Put simply, using 0 is and has always been a bad idea (then there's the NULL macro...). Well, my friends, today, with the release of Visual Studio 2010 Beta 2 and the updated C++ language, compilers and libraries that come with it, the abuse of 0 comes to an end: Introducing nullptr the rvalue constant that actually is a null pointer literal.

Who better to dig deep into nullptr (and a few other topics of related interest and importance) than the great and gifted Stephan T. Lavavej? Stephen is a C++ expert and library author who you've met before a few times on C9. Sit back, relax and learn everything you ever wanted to know about nullptr. Thank you, Stephen, for the awesome lesson!

Enjoy!

VC Team Blog: http://blogs.msdn.com/vcblog/default.aspx

Tags:

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.