Size of int in C on different architectures

前端 未结 7 1831
甜味超标
甜味超标 2020-12-09 20:31

I am aware that the specification of the C language does not dictate the exact size of each integer type (e.g., int).

What I am wondering is: Is there a

7条回答
  •  旧时难觅i
    2020-12-09 20:42

    You could always write an arithmetic library that used vectors of unsigned char for the numbers. That way you could use numbers of whatever bit length you want, and even allow the bit length to vary.

    Actually, you don't need to implement such a library because GNU MP handles this already.

    http://gmplib.org/

提交回复
热议问题