Archived

This topic is now archived and is closed to further replies.

Sand_Hawk

Variable with the size of (long * long) and disk space determination

Recommended Posts

I want to be able to store the bytes written to disk in a variable, however, a long won't do. So I figured if I had the size of (long * long) I would be able to store enough bytes. Also, how can I use the Windows API to determine how much diskspace there is free? If you wonder why I can't do with 2 million or 4.2 million, I am writing a DiskSweeper. It writes 5 times random data into a file. However I want to show the user a sort of progress and how much data there is done. Sand Hawk ---------------- -Earth is 98% full. Please delete anybody you can.
My Site [edited by - Sand_Hawk on November 5, 2002 3:46:12 PM]

Share this post


Link to post
Share on other sites
you could also try
unsigned int bigAssVariable : 999999999999999999999999 (insert your choice of massive number here)

I think this defines the size of the int in bits, but you''ll have to check it, ''cos I don''t have a C++ compiler with me

Share this post


Link to post
Share on other sites
ChaosEngine: That last one won''t work, because you can only define custom variables types with a custom bit length inside a struct and they need to align to 8 bits.

DeanHarding: Thanks, I will work on it when I get home

----------------
-Earth is 98% full. Please delete anybody you can.


My Site

Share this post


Link to post
Share on other sites