Is const void* p the same as a null pointer? Why would i use it?
bumsfeld 413 Nearly a Posting Virtuoso
Recommended Answers
Jump to Post>A NULL pointer is a pointer that points to address 0
Bad dragon, now you're just confusing people. A null pointer doesn't have to refer to a specific address, and just because 0 is a null pointer constant doesn't mean it points to address 0.
Jump to Post>There are many references to that, here's just one of them
Neither of those links (which I've seen before) agree with your claim about a null pointer pointing to an absolute address 0. 0 is a null pointer constant but has nothing to do with the value (absolute or not) …
Jump to Post>The term "null pointer" always referrs to the value stored at the pointer's address, which is 0 when NULL.
That's still not correct as it strongly implies that a null pointer has the value 0, which is all bits zero, which is not necessarily the case. You really should read …
Jump to Post>If 0 is good enough for Bjarne, then it's good enough for me.
0 is good enough because that's how the language works, duh. But saying that a null pointer has a 0 value displays a fundamental confusion between the abstract and the concrete. In the abstract, 0 is a …
All 15 Replies
Rashakil Fol 978 Super Senior Demiposter Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
bumsfeld 413 Nearly a Posting Virtuoso
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
SpS 34 Posting Pro
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
SpS 34 Posting Pro
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.