Is there such a thing as a 64-bit int in C ++?

Is there a real platform / compiler compilation that defines int64 bits? Or is it just used to scare new programmers like me into using int32_twhere size matters (like saving to a file) to make it "portable"?

+5
source share
5 answers

Absolutely such systems. There may be more (or may not be) in the future. And you want to bet on what intwill happen on a possible 128-bit architecture?

Wikipedia has an incomplete but useful summary: http://en.wikipedia.org/wiki/64-bit#64-bit_data_models

+8

, c99 long long 64 . gcc microsoft .

http://jk-technology.com/c/inttypes.html#long_long

+1

, 64- IRIX SGI, , long 64- , -n32 32- . Sun long long, 64 , long 32 . Apple Macintosh int 16 . , , char - 16 DSP DSP.

long long ( ), C. , , <stdint.h> - . .

0

, 64- ints.

An int ( 64- 64- ints, 16- 16 ints ..).

int32_t, , 32 , , , . int32_t 64- , , - . int , . RISC.

0

If you want your code to be portable, you might want to keep 64-bit values ​​for a long time.

0
source

All Articles