Searching a file

Hi programmers. I need code for searching a file.
Example
---------------------------------------------------------------------
Enter file name:
xyz.bmp
Located:
C:\new folder\xyz.bmp
Thanks helios. I am a new one here.
My idea is to write a function that iterates through all the files in the folder and returns the path to file if it encounters a one that meets the parameters. If the file is revealed to be a folder, the function can call itself recursively, until it reaches the 'bottom' of the folder tree. You might take a look at the POSIX libraries dir.h and dirent.h; if you're coding on Windows, you can use MinGW compiler. Another alternative is to use the wxWidgets classes that allow to traverse and manipulate the folders and their contents; I've used them in the latest utility I made.

Just a suggestion.
Thanks almos.
Topic archived. No new replies allowed.