GCC 3.3, XCode:
#include <iostream>
#include <stdint.h>
int main (int argc, char * const argv[])
{
uint64_t a=10123123123LL;
printf("%d\n", a);
std::cout << a;
std::cout << "\n";
return 0;
}
The printf statement gives me 2 (which is the upper 32 bits of a). The
cout gives me the correct result. Is this expected behaviour? Surely
64 bit integers are de rigeur now.
I'm generally trying to use C and not C++ for portability and speed.