What is the call in C++ to determine files.

Started by
1 comment, last by newOperator 20 years, 1 month ago
What is the call in C++ to determine all the files in a director? Including other directories? Could someone help on this please, I know its rather simple, but I don''t remember it and the book I have just talks about reading files, but not diretories. Thanks, L-
Advertisement
There is no such thing in C++, it depends on your platform. On a POSIX system, try opendir(). On Win32, check your docs.

Or you could make your life infinitely simpler by using boost::filesystem.



“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” — Brian W. Kernighan (C programming language co-inventor)
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
Thanks, for the info.

This topic is closed to new replies.

Advertisement