finding capacity of hard drive

This is a discussion on finding capacity of hard drive within the Windows Programming forums, part of the Platform Specific Boards category; How do i find the capacity of a harddrive? is there some GetHardDriveCap function? I just need to find out ...

  1. #1
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903

    finding capacity of hard drive

    How do i find the capacity of a harddrive? is there some GetHardDriveCap function? I just need to find out how big the hard drive is, and how much space is being taken up.

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    249
    I just need to find out how big the hard drive is, and how much space is being taken up.
    Right click your C drive, properties.
    Well, there are a few things wrong with your code:

    1) It does not work.
    2) It does not work.
    3) It does not work.

    Hope this helps.

  3. #3
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    OS dependent. Standard C++ cannot do it. I'm guessing you're on Windows, so this really ought to be moved to the Windows board.
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User
    Join Date
    Aug 2003
    Posts
    1

    Hi try using this header file and the structure...

    Hi try using this header file and the structure...
    May be helpful...

    #include <sys/vfs.h> // ??? [statfs(), etc.]

    int main(void)
    ..

    // variables
    struct statfs fs;
    .
    .
    .
    ..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error with a vector
    By Tropicalia in forum C++ Programming
    Replies: 20
    Last Post: 09-28-2006, 08:45 PM
  2. Hard Drive Hiccups
    By jrahhali in forum Tech Board
    Replies: 3
    Last Post: 07-08-2005, 11:46 AM
  3. Replies: 2
    Last Post: 07-06-2005, 08:11 PM
  4. Getting the hard drive serial number?
    By kes103 in forum Windows Programming
    Replies: 2
    Last Post: 01-18-2002, 03:03 PM
  5. Getting the hard drive serial number?
    By kes103 in forum C Programming
    Replies: 2
    Last Post: 01-18-2002, 01:43 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21