I am developing a application which needs functions of int64 variables. and i was told offset64 or int64_t is viable for my need... But i just wanna what is the prototype of int64 under 32bit system... How can i use the variable. is it a struction which consists of two ULONGs? thanx !
Asked
Active
Viewed 2,086 times
2 Answers
2
There's usually no reason why the compiler can't support 64-bit integer types transparently on a 32-bit (or smaller) platform since it can generate the code necessary to handle them in smaller chunks whenever they are used. AFAIK any C99-compliant compiler should support 64-bit types transparently through the stdint.h header file which defines types such as int64_t and you can use them as you would any other integer type.
[Edit] Example :
#include <stdint.h>
#include <stdio.h>
int main(void) {
int64_t x = 0x1000000000LL;
x = x*2;
printf("%llX\n", x);
}

Per Knytt
- 1,931
- 1
- 11
- 14
-
do u have some examples of using int64. thanx – StevenWang Nov 30 '09 at 02:08
-
You should use "int64_t", not "int64". int64_t is the standard-defined type. – Per Knytt Dec 09 '09 at 08:56