If you need larger than 32-bits you could consider using 64-bit integers (long long), or use or write an arbitrary precision math library, e.g. GNU MP.
More Related Contents:
- Efficient unsigned-to-signed cast avoiding implementation-defined behavior
- Addition of two chars produces int
- Definition of int64_t
- Checking for underflow/overflow in C++?
- Long Vs. Int C/C++ – What’s The Point?
- Why it is different between -2147483648 and (int)-2147483648
- Write a c++ function that will prompt a user for an integer and convert it to binary and print in reverse order [duplicate]
- Why Use Integer Instead of Long?
- How do I detect unsigned integer overflow?
- C++ convert hex string to signed integer
- Is signed integer overflow still undefined behavior in C++?
- Detecting signed overflow in C/C++
- How to concatenate a std::string and an int
- C++ handling very large integers
- Overflowing of Unsigned Int
- C++ integer overflow
- Allowing signed integer overflows in C/C++
- How to check if the input is a valid integer without any other chars?
- What’s the difference between long long and long
- How does a 32 bit processor support 64 bit integers?
- Loop until integer input is in required range fails to work with non-digit character inputs
- how to convert from int to char*?
- Program behaving strangely on online IDEs
- C integer overflow
- C++ floating point to integer type conversions
- C++ – how to find the length of an integer
- Can I hint the optimizer by giving the range of an integer?
- If a 32-bit integer overflows, can we use a 40-bit structure instead of a 64-bit long one?
- Is there some meaningful statistical data to justify keeping signed integer arithmetic overflow undefined?
- How Can I avoid char input for an int variable?