Thread: Regarding File search

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    5

    Regarding File search

    In C++, how can we get the list of files in present directory and subdirectories, into an array ? any help...
    thnx a lot in advance

  2. #2
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    FAQ > How do I... (Level 3) > Accessing a directory and all the files within it
    http://faq.cprogramming.com/cgi-bin/...&id=1044780608
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

  3. #3
    Registered User
    Join Date
    Jun 2004
    Posts
    722
    the first example with the findfirst and findnext functions isn't win32 nor posix nor ansi compliant, and the win32 code is to big and confusing.Go here for something simpler
    http://cboard.cprogramming.com/showthread.php?t=59374

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  2. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM