(long long) Visual C++ question

Status
Not open for further replies.

mImoto

Full Member level 4
Joined
Feb 21, 2002
Messages
210
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
1,733
Hello,

I would like to use a C++ library. The problem is that it was not developed for Visual C++ 6.0. I have problems with the (long long) type cast. I woudl appreciate any help on how to solve the long long problem.

unsigned char buffer[255+5];
unsigned long address_field;
unsigned long address_base;

.................................

if
(
(
(long long)address_base + address_field
<
((long long)1 << 32)
)
&&
(
(long long)address_base + address_field + buffer[0]
>
((long long)1 << 32)
)
)
 

Try this one solution:
if((
(long long) address_base + (long long) address_field < ((long long) 1<<32)) &&
((long long)address_base + (long long) address_field + (long long) buffer[0] > ((long long) 1<<32)))
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…