Directory/File info [Archive] - C Board

PDA

View Full Version : Directory/File info


Anonymous
03-20-2002, 03:52 PM
How do I get a list of all files/directories in a specified directory (Eg. "/home") using C++ header files/namespaces and not C header files?

muttski
03-20-2002, 04:03 PM
I dont understand, why no C headers?

Deckard
03-21-2002, 06:22 AM
Hmm, this is such an odd request that I suspect it originated from a teacher or a junior V.P. Either way, you should be able to make use of the system() library function by including iostream.h.

system( "ls /home" );

HTH

muttski
03-21-2002, 01:47 PM
Maybey, but I thought system was in stdlib and thats C, maybey its in both.