Related questions
What exactly is nullptr?
We now have C++11 with many new features. An interesting and confusing one (at least for me) is the new nullptr.
Well, no need anymore for the nasty macro NULL.
int* x = nullptr;
myclass* obj = nullptr;
Still, I am not …
What are the advantages of using nullptr?
This piece of code conceptually does the same thing for the three pointers (safe pointer initialization):
int* p1 = nullptr;
int* p2 = NULL;
int* p3 = 0;
And so, what are the advantages of assigning pointers nullptr over assigning them the values NULL …