They look fine to me. Instead of being too concerned with such details, just use NULL and compile at a high warning level to help to detect issues.Originally Posted by Sabidos
Yes.Originally Posted by Sabidos
What that part of the standard actually means is that null pointers are guaranteed to compare unequal to pointers that actually point to something, be it an object or a function. It's not concerned about null pointers of different types.Originally Posted by Sabidos
Having said that, it would be confusing to use a null pointer of type int* when you want to initialise a pointer to float. Don't do that, even if your compiler allows it.