On Suday the 11th of February, 2007 -after 3 and a half years on InvisionFree, we have moved! This old board remains as a read only archive of years past, and registration has been disabled here. All new and current members should register at http://www.cpplc.net/forum .
| · Portal |
Help
Search
Members
Calendar
|
| Welcome Guest ( Log In | Register ) | Resend Validation Email |
| Welcome to C++ Learning Community. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
![]() ![]() ![]() |
| feldmarschall |
Posted: Feb 5 2007, 01:28 AM
|
![]() nerd Group: Members Posts: 143 Member No.: 2,141 Joined: 3-October 06 |
So I have a directory of something like 1600 files, and I need to put all their filenames into one big list in a text file.
All I need now is to figure out how to grab all the filenames from the directory, then I can fprintf them all into my text list. Any suggestions? Been looking through google and havent found anything helpful..I'll try some more. And it needs to grab the full name blahblah.crap, etc. -------------------- "You play injured. This isn't baseball." - Jeff Beukeboom.
|
| yankees26 |
Posted: Feb 5 2007, 03:04 AM
|
|
Yes, that is a rectangular Caveman with a Hammer Group: Members Posts: 530 Member No.: 1,688 Joined: 23-February 06 |
You could try using Boost if this is in C++ or if its C or C++ then you could use dirent.h http://www.informit.com/guides/content.asp...seqNum=245&rl=1
But I am not sure how supported dirent.h is. -------------------- "To the pessimist the glass is half empty, to the optimist the glass is half full, to the computer programmer the glass is twice as large as it needs to be." ~Anonymous "I have been a scientist and I have been an engineer. I know the difference." ~ Maurice Vincent Wilkes on the term Computer Science (according to wikiquote it is attributed) |
| feldmarschall |
Posted: Feb 5 2007, 08:32 AM
|
![]() nerd Group: Members Posts: 143 Member No.: 2,141 Joined: 3-October 06 |
Well I suppose I could do it in a separate C++ project on my box here and then translate the results into the game.
Is boost difficult to use? And what functions in should I be looking at? -------------------- "You play injured. This isn't baseball." - Jeff Beukeboom.
|
| yankees26 |
Posted: Feb 8 2007, 11:14 PM
|
|
Yes, that is a rectangular Caveman with a Hammer Group: Members Posts: 530 Member No.: 1,688 Joined: 23-February 06 |
I've never actually used boost for this stuff, but take a look at boost::filesystem documentation at boost.org.
-------------------- "To the pessimist the glass is half empty, to the optimist the glass is half full, to the computer programmer the glass is twice as large as it needs to be." ~Anonymous "I have been a scientist and I have been an engineer. I know the difference." ~ Maurice Vincent Wilkes on the term Computer Science (according to wikiquote it is attributed) |
![]() |
![]() ![]() ![]() |