0
NULL pointer
Could anyone explain null pointer..
1 ответ
+ 2
If you want a pointer to point nowhere, you can give it the value 'nullptr'.
Normally when you declare a pointer but you don't initialize it, it may just point somewhere (and you are not certain what is located at that memory location). But if you assign the value 'nullptr' to the pointer, it just points nowhere.
The advantage is that you (for example) don't accidentally alter the memory at some random memory location