Thursday, 12 September 2013

C++11- Use nullptr all the time?

C++11- Use nullptr all the time?

I'm just a little bit confused.
When should I use nullptr?
I've read on some sites that it should always be used, but I can't set
nullptr for a non-pointer for example:
int myVar = nullptr; // Not a pointer ofcourse
Should I always use NULL non-pointers and nullptr for pointers?
Thanks to any help! I'm very new to c++ 11 (and c++ overall).

No comments:

Post a Comment