Vasilis Serghi <vs*****@jaguar.com> scribbled the following:
I would like to make a call to the OS to give me a listing of the files in
the current directory. How can i do this in a console environment?
I have tried system("dir");, but I'm not sure how to get that info into an
array. I could pipe the info into a file like this system: ("dir >
file.txt");, but I want to avoid creating files if possible.
I am a newbie, so excuse me if this is a simple question.
The only way in ISO standard C is to do the piping you describe above.
For more operation-system-friendly approaches, consult a newsgroup
dedicated to your own implementation.
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\--
http://www.helsinki.fi/~palaste --------------------- rules! --------/
"B-but Angus! You're a dragon!"
- Mickey Mouse