GCC很长,C++ 0x的编译器也是如此.MSVC++(尚未),但确实有你可以使用的__int64.
#if (__cplusplus > 199711L) || defined(__GNUG__)
typedef unsigned long long uint_64_t;
#elif defined(_MSC_VER) || defined(__BORLANDC__)
typedef unsigned __int64 uint_64_t;
#else
#error "Please define uint_64_t"
#endif
uint_64_t foo;
std::fstream fstm( "file.txt" );
fstm >> foo;
Run Code Online (Sandbox Code Playgroud)