The C++ standard (21.5 Numeric conversions) says that %lld must be available, however mingw still does not support it and in the meantime the most practical solution seems to use long int instead of long long int.