Is there a way to find whether a pointer is assigned a value or not?
Printable View
Is there a way to find whether a pointer is assigned a value or not?
If you set pointers to 0 (or null, pretty much same thing in C++) when they no longer point to anything, you can just check if it is a null pointer. Other than that no, I do not think you can properly determine if a pointer points to a valid object or not.