Array to integer problem(integer too long).
Eljay Love-Jensen
eljay@adobe.com
Wed Feb 16 17:53:00 GMT 2005
Hi Victor,
%d expects an int parameter, not a long long.
%ll is not a valid conversion specifier.
%L is not a valid conversion specifier.
%q is not a valid conversion specifier.
NOTE: 9223372036854775807LL is the largest long long.
Try this...
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
long long test;
test = 89126342536LL;
printf("Test d : %d \n", (int)test); // truncate to int for %d
printf("Test ll: %lld \n", test); // %lld for long long
}
HTH,
--Eljay
More information about the Gcc-help
mailing list