• Advertisement
Sign in to follow this  

64 bit numbers

This topic is 4557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to use 64 bit integers in dev-cpp? Thanks. mike http://www.coolgroups.com/

Share this post


Link to post
Share on other sites
Advertisement
In DevCpp's version of the gcc compiler, long long should be 64 bits.

Share this post


Link to post
Share on other sites
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_VER
typedef __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;
#endif

typedef unsigned s8 u8;
typedef unsigned s16 u16;
typedef unsigned s32 u32;
typedef unsigned s64 u64;

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement