hello, is there any elegant way to get the equivalent of system("dir *./b/w > list_of_shows.txt ") then get the text inside of a string ? 
using external command of system ( winXP) I m enclenching and flashing a dos window...
I was thinking to do something like tree>my_string, but commands like dir or tree seems not existing in gcc 
thanks for the answer !!!
If you're using Allegro, you might consider using these functions.
[EDIT]
Heh, you are lazy ... you didn't even search for your problem! This was the thread below your one ...
yes, I m under allegro ( so i m not using system command because they flash shortly the ms dos screen on my app).
in fact, is there any key word for just having list of folder types inside a folder ?
( thanks for your answer!);D
is there any key word for just having list of folder types inside a folder
FA_DIREC?
al_findfirst("*", &info, FA_DIREC);
Were you asking how to just see the folders? Above + al_findnext gives you the directories.
Can someone explain why such a thing is not part of standard c++ (though most cross-platform libraries end up including such functionality). This is a really common task.
Can someone explain why such a thing is not part of standard c++ (though most cross-platform libraries end up including such functionality). This is a really common task.
Sure: It's a command task on PCs, but that's not what C++ was designed for.
I was thinking about the scope of C++ and its embedded stuff (Since i deal with that too) and embedded systems actually deal a lot with files as well. It's really just one of those things that has some obscure bs reason or it could be as simple as no one has bothered yet.
thanks to evey body for the answer, always a pleasure!!!
Can someone explain why such a thing is not part of standard c++
This is a common part of C and C is part of C++ so you have this functionality readily availiable in C++ too.
http://www.gnu.org/software/libc/manual/html_node/File-System-Interface.html#File-System-Interface
embedded systems actually deal a lot with files as well.
Some do, but even in those it's not uncommon to have a radically different file system than the PC one, which makes it impossible to design a unified interface to.
Of course, it occurs to me know that I'm confusing C++ and the standard library. Sooo, I suppose a better reason is simply that Microsoft didn't think it was worthwhile to implement the functions in HoHo's link.