In C++, how can we get the list of files in present directory and subdirectories, into an array ? any help...
thnx a lot in advance
In C++, how can we get the list of files in present directory and subdirectories, into an array ? any help...
thnx a lot in advance
FAQ > How do I... (Level 3) > Accessing a directory and all the files within it
http://faq.cprogramming.com/cgi-bin/...&id=1044780608
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.
the first example with the findfirst and findnext functions isn't win32 nor posix nor ansi compliant, and the win32 code is to big and confusing.Go here for something simpler
http://cboard.cprogramming.com/showthread.php?t=59374