Yep, you're right, using "%I64d" works now. This raises two further questions though:
Does Microsoft officially support a "long long" type? I.E. should "__int64" be used instead of "long long" when programming for windows (since "long long" by ISO standards is not garaunteed to be just 64bits)?
And if so, how does Microsoft then handle an "unsigned long long" type for scanf/printf? "%uI64" or "%uI64d" etc do not work.. here is some code that tests some of these issues:
Code:
#include <stdio.h>
#include <limits.h>
int main(void)
{
long long int test;
printf("Enter long long int:\n");
scanf("%I64d", &test);
printf("%I64d", test);
printf("\n%I64d", LLONG_MAX);
printf("\n%ull", ULLONG_MAX);
printf("\n%uI64", ULLONG_MAX);
}
The last two produce interesting results...