64 bit numbers
Does anyone know how to use 64 bit integers in dev-cpp?
Thanks.
mike
http://www.coolgroups.com/
Quote:Original post by dyerseve
__int64 only works on MSVC and Borland's compiler AFAIK.
...and Dev-cpp. I think dev-cpp can import from MSVC.
Although Dev-cpp itself is only the IDE.
Here's a reasonably portable way of getting integers with fixed sizes, it shouldn't be too hard to add other compilers without stdint.h either.
#ifdef _MSC_VERtypedef __int8 s8;typedef __int16 s16;typedef __int32 s32;typedef __int64 s64;#else#include <stdint.h>typedef int8_t s8;typedef int16_t s16;typedef int32_t s32;typedef int64_t s64;#endiftypedef unsigned s8 u8;typedef unsigned s16 u16;typedef unsigned s32 u32;typedef unsigned s64 u64;
Quote:Original post by doynax
Here's a reasonably portable way of getting integers with fixed sizes, it shouldn't be too hard to add other compilers without stdint.h either.
Here's one better:
#include <boost/cstdint.hpp>
[Edited by - SiCrane on September 1, 2005 7:18:06 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement