Advertisement

The byte datatype

Started by June 16, 2002 03:09 PM
6 comments, last by steveharper101 22 years, 8 months ago
There is probubaly a really simple answer to this but I get the following error message ''byte'' undecleared identifier when trying to declare a variable of type byte ie: byte Color; Why is this? Thanks Steve
its a char
Advertisement
keep in mind that not all compilers have byte data type. Use char instead, same size.


My compiler generates one error message: "Doesn''t compile."
-Albert Tedja-
My compiler generates one error message: "does not compile."
Try capitalising the word byte (ie. BYTE). I know VC++6 needs this.
byte == unsigned char. Using char can cause you problems because it may be either a signed or an unsigned type.
---visit #directxdev on afternet <- not just for directx, despite the name
Thanks for the reply''s guys, it''s just that some VC++ projects i have compiled fine with the byte data type yet when i use it in my own project the compiler gives an error. Does anybody know where i can find an option in the compilers settings to enable support for the byte datatype?

Thanks Steve
Advertisement
BYTE is not a built in data type, it''s just a typedef in one of the windows headers.
Thanks for that guys, i see what you mean now it''s a typedef of an unsigned char somewhere inside one of the header files in windows.h

Thanks alot for the replies

Steve

This topic is closed to new replies.

Advertisement