|
-
Dec 13th, 2001, 03:15 PM
#1
Thread Starter
Hyperactive Member
Data Types
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++?
-
Dec 13th, 2001, 03:24 PM
#2
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|