Jump to content
  • Advertisement
Sign in to follow this  
mike74

64 bit numbers

This topic is 4821 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
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.

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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!