Not true and false, just NULL. At the moment, it just happens to be that NULL is #defined to be 0 (== false). It's conceivable that at some point, on some C/++ library for some OS, NULL might be one past the system's max memory. I personally think that that's not a reasonable expectation, but it is conceivable. Hopefully you at least see the point =)programmerinprogress wrote:Could you imagine the chaos if the C++ standardisation committee decided one day to start using different numbers for true and false? all hell would break loose!
A probably stupid SDL problem
Moderator: Coders of Rage
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: A probably stupid SDL problem
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: A probably stupid SDL problem
Sounds like something XxStillAVirgin69xX would say...== NULL is "good practice" "in case they decide to change NULL from 0 to some other number"
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: A probably stupid SDL problem
Actually I heard it from someone that was more like ImaProfessional420, but I still don't agree with it.
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: A probably stupid SDL problem
If they decide to change the value of NULL, then we'll adapt. Until then, I will use if( [variable] ) and if(![variable] ).
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.