Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: Beginner
May 23, 1999



Building the Right Environment to Support AI, Machine Learning and Deep Learning

64-bit integer support

How can I support 64-bit integers on a 32-bit system? I need to do division on numbers exceeding 4.3 billion. I have the resaults in a char value, and would like to convert the value to a 64-bit integer, if possible. If not, do you know of a way to translate the resault of a float division into a more human readable format?

As with so many questions I see here, this depends on your compiler, which you didn't specify.

If, like me, you are using Visual C++, you can declare a 64-bit integer like this:

__int64 i;
Some systems use this:

long long i;
You'll need to refer to your compiler's documentation to determine if this is something it supports.
DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date