Im looking for c++ types equivilent to vb data types. I know most of them (Char and int and floating etc...) but ive never seen anything for Byte. Is there a 'Byte' or an equivilent to it in c++?
Printable View
Im looking for c++ types equivilent to vb data types. I know most of them (Char and int and floating etc...) but ive never seen anything for Byte. Is there a 'Byte' or an equivilent to it in c++?
C (and therefore C++) differentiates between signed and unsigned values, so a Byte is probably unsigned char, with a range from 0 to 255. A signed char is from -127 to 127.
char = 1 byte
short = 2 bytes
int = 4 bytes
long = 4 bytes
:)
Note: int is normally dependent on your compiler. If it is 16-bit, then it will probably be equivalent to short. On 32-bit (which you should be using) then it will be the same as long.