Sign in to follow this  

64 bit numbers

This topic is 4486 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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this