What is the suffix used for long constants

If I want to use something like below in C code:

if(num < 0x100000000LL) 

I want the comparison to take place by a long constant constant, but the LL suffix does not work in MSVC6.0, but it works in MS Visual Studio 2005.

How can I make it work in MSVC 6.0?

-Ajit

+4
source share
3 answers

AFAIK, long long is not supported in MSVC 6.0.

For example, look at a discussion topic . Perhaps __int64 works instead. Anyway, I don't know which other suffix to use.

EDIT: __int64 seems to work, and for helper functions it seems that the suffix is ​​not needed at all. Take a look here , for example. There is also a workaround at the end of this page.

+1
source

The long long type was standardized in the 1999 ISO C standard and is expected to be standardized in C ++ this year or next (whenever the standard is completed). Like all of these standard features, there were early followers and late adopters. Language standards committees are generally reluctant to include things that have not been tried before.

Visual C 6.0 was released in 1998 and therefore precedes any standard with long long in it.

+1
source

I do not have a copy of VC 6.0 for verification, but does i64 work? (e.g. 12i64 )

0
source

All Articles