Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

(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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top