What is the bit size of long on 64-bit Windows?
Posted
by acidzombie24
on Stack Overflow
See other posts from Stack Overflow
or by acidzombie24
Published on 2008-12-21T14:10:43Z
Indexed on
2010/03/15
1:59 UTC
Read the original article
Hit count: 384
Not to long ago someone told me that long are not 64 bits on 64 bit machines and i should always use int. This did not make sense to me. I seen docs (such as the one on apples official site) say that long are indeed 64 bits when compiling for a 64bit CPU. I looked up what it was on windows and found
- Windows: long and int remain 32-bit in length, and special new data types are defined for 64-bit integers.
from http://www.intel.com/cd/ids/developer/asmo-na/eng/197664.htm?page=2
What should i use? should i define something like uw, sw ((un)signed width) as a long if not on windows. Otherwise do a check on the target CPU bitsize?
© Stack Overflow or respective owner