Thread: Searching files in a directory

  1. #1
    Registered User
    Join Date
    Jul 2007

    Searching files in a directory


    I want my program to create a String vector containing all the filenames in the directory the program is run in. How do I do this?

    I've been searching the internet for hours and all I can find is miles of help on accessing known filenames (like from the command line).



  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    It's a pity you didn't read the FAQ.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 07-24-2008, 09:02 AM
  2. All files in a directory
    By cloudy in forum Linux Programming
    Replies: 1
    Last Post: 06-09-2008, 01:50 AM
  3. 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
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  5. Dos commands hehe
    By Carp in forum A Brief History of
    Replies: 2
    Last Post: 01-17-2003, 02:51 PM