Hi all
A book I'm learning Direct3D from is causing more problems than it's solving so far!
I am coming across a data type called "BOOL" - in capitals, not to be confused with the standard "bool" syntax. The only data that it seems to be given is "TRUE" AND "FALSE" - again with capitals.
The book does not provide any header that might contain a BOOL class, and seems to expect the reader not to be surprised by this new data type. It seems to treat the data as an array as it checks the data using the following syntax:
It's obviously checking the letter in the "TRUE" or "FALSE" data provided by the user (although it's not clear why it's checking buf[1] instead of buf[0] ).Code:if (buf[1]=='F')
I was not surprised when Visual Express 2008 came back with: "syntax error: identifier 'BOOL'. However I can't change this data to a standard "bool" data type without majorly screwing with other code (it's a big program and I don't really have to space to explain why this this is!).
I was wondering if anyone has come across this before? If so please could you explain where "BOOL" comes from and how it works? Bonus points if you can also explain why the above if statement would check buf[1] instead of buf[0]!
Thanks a lot :-)