Just ignore warnings
-
For some reason, in my mind null was always implicitly (maybe even explicitly) #defined as 0. Both on Windows and *NIX (x86/SPARC). Is there a platform where null is not represented by 0?
-
@Gazzonyx said:
For some reason, in my mind null was always implicitly (maybe even explicitly) #defined as 0. Both on Windows and *NIX (x86/SPARC). Is there a platform where null is not represented by 0?
Not in any conforming C or C++ compiler. 0 in a pointer context always represents the NULL pointer.
What you can have however, is a platform where the (internal) representation of the NULL pointer is not actually all-bits zero. There's a list at http://c-faq.com/null/machexamp.html
-
@Me, on Twitter just now said:
The correct answer to "does 0 mean literally 0 in a pointer compare in C++?" is "who gives a shit? STOP WANKING AND BUILD SOME SOFTWARE."
-
@blakeyrat said:
@Me, on Twitter just now said:
The correct answer to "does 0 mean literally 0 in a pointer compare in C++?" is "who gives a shit? STOP WANKING AND BUILD SOME SOFTWARE."
You must be new here. Building software is boring (unless it's writing your own programming language, compiler or XML parsing library). Talking about obscure behavior of pointers: now that's excitement.
-
@blakeyrat said:
@Me, on Twitter just now said:
The correct answer to "does 0 mean literally 0 in a pointer compare in C++?" is "who gives a shit? STOP WANKING AND BUILD SOME SOFTWARE."
So you're saying that these guys trolled you into replying in multiple places?
-
@boomzilla said:
So you're saying that these guys trolled you into replying in multiple places?
We've already figured out he's from Venus, they're not happy unless they're complaining rather than finding things out - the more places the better it seems.
-
@PJH said:
We've already figured out he's from Venus, they're not happy unless they're complaining rather than finding things out - the more places the better it seems.
Besides, he makes wanking sound like something bad. Where would TDWTF be without wanking?
-