Problem with const long long

Write here if you have problems with your C++ source code

Moderator: Board moderators

Post Reply
StatujaLeha
Learning poster
Posts: 91
Joined: Tue May 31, 2005 2:01 pm
Location: Russia

Problem with const long long

Post by StatujaLeha » Mon Aug 29, 2005 3:40 pm

Hi all! I have a little problem with const long long. There is in my code next lines:

Code: Select all

typedef unsigned long long int UInt64;
..............
if(Result >= UInt64(0xfffffffffffffff)/((j - 1)*z + i))
I get Compile Error everytime:
03879793_24.c:53: integer constant out of range
Could anyone explain me it?

Larry
Guru
Posts: 647
Joined: Wed Jun 26, 2002 10:12 pm
Location: Hong Kong and New York City
Contact:

Post by Larry » Mon Aug 29, 2005 3:58 pm

Use "LL".

StatujaLeha
Learning poster
Posts: 91
Joined: Tue May 31, 2005 2:01 pm
Location: Russia

Post by StatujaLeha » Mon Aug 29, 2005 5:22 pm

Larry wrote:Use "LL".
What is "LL"?

Code: Select all

typedef unsigned long long UInt64;
..............
if(Result >= UInt64(0xfffffffffffffff)/((j - 1)*z + i))
Is it correct?

StatujaLeha
Learning poster
Posts: 91
Joined: Tue May 31, 2005 2:01 pm
Location: Russia

Post by StatujaLeha » Mon Aug 29, 2005 5:32 pm

Thank you, Larry. I have understood.

Post Reply

Return to “C++”