Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

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



Application Security Testing: An Integral Part of DevOps

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