-
Subtraction
For some reason, I can't do this
Code:
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?
-
Code:
lpTotalBytesUsed.QuadPart = lpTotalNumberOfBytes.QuadPart - lpTotalNumberOfFreeBytes.QuadPart;
ULARGE_INTEGER is a union, not a single type. Look at the definition.
-
Thanx
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?
-
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 :)
-
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
-
Or double-click the line.