View Single Post
Join Date: Jun 2008
Posts: 973
Reputation: Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough 
Solved Threads: 107
Alex Edwards's Avatar
Alex Edwards Alex Edwards is offline Offline
Posting Shark

Re: What header do I look at for...

 
0
  #4
Nov 21st, 2008
I'd like to know how the types are defined based on the platform.

I have heard that in C++ a char is always 1 byte and an integer is always 4 bytes on any machine, despite how many bits are available for an individual byte.

For example, a char can be measured as 1 byte even though its byte value is measured with 16 bits instead of 8, so I wanted to see how this is possible to better understand the situation...

I'm sorry if this sounds like a loose question, but its weird that 1 byte can still be 1 byte even if the type consists of 16 bits instead of 8 @_@.

I wanted to see if there was some header or implementation that defined the way bytes were mapped for each type >_<

-Alex
Last edited by Alex Edwards; Nov 21st, 2008 at 3:21 pm.
Reply With Quote