Directory MP3 Search

This is a discussion on Directory MP3 Search within the Windows Programming forums, part of the Platform Specific Boards category; sizeof(HANDLE ) is (so far always) the same as sizeof(void *), so a HANDLE in a 64 bit program is ...

  1. #16
    Cat
    Cat is offline
    Registered User
    Join Date
    May 2003
    Posts
    1,571
    sizeof(HANDLE ) is (so far always) the same as sizeof(void *), so a HANDLE in a 64 bit program is 64 bits not 32.
    You ever try a pink golf ball, Wally? Why, the wind shear on a pink ball alone can take the head clean off a 90 pound midget at 300 yards.

  2. #17
    Registered User
    Join Date
    Nov 2006
    Posts
    13
    This is something I had saved in my hardrive cpp reference code directory, I forgot where it came from. No windows code even needed.

    Code:
    #include <iostream>
    #include <dirent.h>
    
    
    int main()
    {
    
        std::string path = "./";
    
        DIR *d = opendir(path.c_str());
        struct dirent *dir;
    
    
        if(d)
        {
            while ((dir = readdir(d)) != NULL)
            {
                std::cout << dir->d_name << std::endl;
            }
            closedir(d);
        }
        
        std::cin.get();
        return 0;
    }
    I guess you can save all the names of files as variables and if the file does not have an extension then it is a directory and just use recursion and the loop again untill it has gone through all the subdirectories.
    Last edited by newtocpp; 11-14-2006 at 03:19 AM.

  3. #18
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    int, int32
    What's the difference between int and int32? They're both 32 bits (4 bytes).
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  4. #19
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    size of int depends of the compiler (and may - on target system)
    size of int32 - always 32 bit
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  5. #20
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I will probably never use a 16bit compiler, so... there's no real difference to most of us. Unless int is defined as 64bit.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

  6. #21
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    64bit compilers are available
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

  7. #22
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    Quote Originally Posted by maxorator
    I will probably never use a 16bit compiler, so... there's no real difference to most of us. Unless int is defined as 64bit.
    Or you might run a quick VB app to test some C++ COM code, (both written using the same IDE) and expect an int to hold the same magnitude in both......oops


    Point is, the size of an int is not a constant.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can i check a directory for certain files?
    By patrioticpar883 in forum C++ Programming
    Replies: 13
    Last Post: 02-01-2008, 05:27 PM
  2. Finding files in a directory
    By smarta_982002 in forum C Programming
    Replies: 1
    Last Post: 01-25-2008, 10:10 AM
  3. Search For a Directory
    By IdioticCreation in forum C++ Programming
    Replies: 2
    Last Post: 06-03-2007, 03:53 PM
  4. Simple search program
    By colinuk in forum C Programming
    Replies: 6
    Last Post: 12-18-2004, 01:58 AM
  5. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 04:00 PM

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