www.digitalmars.com         C & C++   DMDScript  

c++ - 64 bit

reply rebel <rebel777 home.nl> writes:
Hi,

int x;   // 32 bit

How to declace an 64 bit unsigned variable in Digital Mars ?

Thanks,

Ed
Nov 13 2011
parent reply Bernard Helyer <b.helyer gmail.com> writes:
On Sun, 13 Nov 2011 18:20:41 +0000, rebel wrote:

 Hi,
 
 int x;   // 32 bit
 
 How to declace an 64 bit unsigned variable in Digital Mars ?
 
 Thanks,
 
 Ed

#include <stdint.h> uint64_t x;
Nov 13 2011
parent "Nick Hofstetter" <nhofstetter gfg-group.com> writes:
I was looking at this and found a bug in the run time library. Should be 
able to create a long long using atoll, but atoll calls strtoll with a base 
of 0 and not 10.

long long atoll(const char *p)
{
    return strtoll(p, (char **)NULL, 0);
}

So if the string has leading zeros it is assumed to be an octal number.
Nov 16 2011