Gisle Vanem <[EMAIL PROTECTED]> writes: > "Hrvoje Niksic" wrote: > >> Does MSVC support long long? If not, how does one... > > No, it has a '__int64' built-in. > >> * print __int64 values? I assume printf("%lld", ...) doesn't work? > > Correct, use "%I64d" for signed 64-bit and "%I64u" for unsigned. > >> * retrieve __int64 values from strings? I assume there is no >> strtoll? > > No, but MSVC7 has a __int64 __cdecl _strtoi64(const char *str, char > **endptr, int base);
Thanks for the info. Is it OK to just require MSVC7, or should we write a compatibility function for earlier versions? The nice thing about _strtoi64 is that its interface is compatible with strtoll, which means one can #define str_to_wgint to strtol, strtoll, or _strtoi64, as appropriate for the platform. One more question: how does one spell 64-bit constants in MSVC? google seems to suggest nnnI64; how portable is that?