Jump to content
  • Advertisement

Archived

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

rjahrman

Which files are in a folder? (C++ Question)

This topic is 5815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

(This may sound basic, but I looked through MSDN for hours and found NOTHING.) In Windows C++, how can I create an array containing the filenames of all the files in a given directory?

Share this post


Link to post
Share on other sites
Advertisement
Quick search of MSDN..

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/storage_2kft.asp

This example shows you how to find files in a directory and display the filenames to the screen. You can easily store these in a stl string array, and resize the array everytime a new file is found. That's how I would do it.

[edited by - Coaster Kev on August 17, 2002 4:04:15 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!