PDA

Click to See Complete Forum and Search --> : Subtraction


Wak
Jul 22nd, 2001, 02:45 AM
For some reason, I can't do this



ULARGE_INTEGER lpTotalBytesUsed, lpTotalNumberOfBytes, lpTotalNumberOfFreeBytes;

lpTotalBytesUsed = lpTotalNumberOfBytes - lpTotalNumberOfFreeBytes;


I get this:

--------------------Configuration: PieGraph - Win32 Debug--------------------
Compiling...
PIEGRAPH.cpp
C:\Windows\Desktop\Matt\Win32 C++\Chapt 5\PieGraph\PIEGRAPH.cpp(97) : error C2676: binary '-' : 'union _ULARGE_INTEGER' does not define this operator or a conversion to a type acceptable to the predefined operator
Error executing cl.exe.

PieGraph.exe - 1 error(s), 0 warning(s)

------------------------------------------------------------------------------------------
Any Ideas?

parksie
Jul 22nd, 2001, 05:42 AM
lpTotalBytesUsed.QuadPart = lpTotalNumberOfBytes.QuadPart - lpTotalNumberOfFreeBytes.QuadPart;ULARGE_INTEGER is a union, not a single type. Look at the definition.

Wak
Jul 22nd, 2001, 11:00 PM
I get it know... How do you find all this stuff out?? How can I find out the struct form of a ularge_integer without consulting MSDN?

parksie
Jul 23rd, 2001, 02:04 AM
Right-click on any identifier (within VC++, not sure about other IDEs) and go "Definition". That should pop up a message about browse info, press OK and it will recompile and when it's finished you'll go to the definition :)

Emo
Jul 23rd, 2001, 03:53 AM
Also...
One more tip from me...

When you get a compile error, click inside the window where it tells you what's going on with the compile proces. Click on the line with the error and press Enter. That will take you to the line where the error is...

-Emo

parksie
Jul 23rd, 2001, 11:04 AM
Or double-click the line.