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 !
+1
A:
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 Ekman
2009-11-28 13:49:36
do u have some examples of using int64. thanx
Macroideal
2009-11-30 02:08:54
You should use "int64_t", not "int64". int64_t is the standard-definedtype.
Per Ekman
2009-12-09 08:56:26