Seems to be some miss information. bool != BOOL. Obviously someone is not familiar with the windef.h file, if you were you would know it read
typedef int BOOL;
int != bool.
c ++ compilers
quote:Original post by Sabonis
ive been having problems with lockups and freezing with some code i wrote in the past (you can check my threads in the direct x forum).
If the lockups and freezes occur in code you wrote, then obviously your code is causing the lockups and freezes!
Email the book publisher and tell them about the error!!!! I really don''t see how the makers of the book could have let a simple compile error slip through!
Proceeding on a brutal rampage is the obvious choice.
why dont you check out my other threads in direct x and copy/paste them for yourself... they freeze on my and im not sure its just my configuration
You''re right I haven''t read "windef.h" because I can''t personally be bothered to read all the Windows API headers.
Either way, I''m not really that wrong:
In only a select few cases are the two not interchangable, and that''s when Microsoft''s functions return those damned troolean values. But personally, anyone that programs a function of their own that''s designed to return a troolean value should be maimed. It''s the least intuitive thing ever. If a function is meant to return three or more values, it should return an int as is, none of this BOOL crap because it only confuses the code.
Anyway, you can still assign integer values to a standard bool, but if the value is neither 0 nor 1, it''ll be truncated to 1 (that may differ by compiler; I''m not sure).
But now allow me to amend my statement:
In almost all cases, the uppercase and lowercase versions are entirely interchangeable since the integer values 1 and 0 can be assigned successfully to a standard boolean variable. The only exception when using MSVC++ is when a troolean function returns a negative value.
That good enough? Sorry for the "miss information".
-Auron
Either way, I''m not really that wrong:
quote:
AFAIK, the uppercase and lowercase versions are entirely interchangeable.
In only a select few cases are the two not interchangable, and that''s when Microsoft''s functions return those damned troolean values. But personally, anyone that programs a function of their own that''s designed to return a troolean value should be maimed. It''s the least intuitive thing ever. If a function is meant to return three or more values, it should return an int as is, none of this BOOL crap because it only confuses the code.
Anyway, you can still assign integer values to a standard bool, but if the value is neither 0 nor 1, it''ll be truncated to 1 (that may differ by compiler; I''m not sure).
But now allow me to amend my statement:
In almost all cases, the uppercase and lowercase versions are entirely interchangeable since the integer values 1 and 0 can be assigned successfully to a standard boolean variable. The only exception when using MSVC++ is when a troolean function returns a negative value.
That good enough? Sorry for the "miss information".
-Auron
quote:Original post by RobTheBloke
In my time I've used the introductory/standard/pro & enterprise editions of VC6 and now have VC.net and have never had a problem with any of them.
It crashes a lot for me (especially on XP)
except for .net, 'cause i've never used it
[edited by - mrx02 on August 27, 2002 2:25:31 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement