Although there are already a lots of such questions on stack overflow regarding this (almost near to what I want to know). But none of those got the answer that would have solved the case.
My question basically is about following:
Is it possible to implement 64-bit integers using a 32-bit compiler? What is the significance of bit-size of compiler in deciding size of integer? (not considering performance issues)
Somewhat related questions already asked are:
-
Does the size of an int depend on the compiler and/or processor?
-
What does the C++ standard state the size of int, long type to be?
Each of above question had some very good answers with them but in the end, no one of them gave me an exact answer.
int64_tis a 64b integer type and is available if you includestdint.h.uint64_tis the unsigned version and is defined in the same header.See Are types like uint32, int32, uint64, int64 defined in any stdlib header? for more details.
Sure. There’s usually no need unless you’re on a really restricted instruction set, but it’s definitely possible. How to implement big int in C++ explains how to do arbitrary precision integers which is a strictly harder problem to solve.