I wrote a simple program that works like the dos find command
> Searches for a text string in a file or files.
except mine will output line numbers, and counts the number of matches.
The only problem is I have not been able to make it search using wild cards. or subfolders. I read somewhere that boost file system would make that easier to program.
I'm in the process of trying to install boost now, wish me luck, but I'm wondering if anyone has a working program that would give me a good example similar to what I'm trying to do.
There is no built-in search using wildcards. You can run a directory_iterator or recursive_directory_iterator and skip the entries that do not match your pattern. I would convert the wildcard expression to a regular expression, since it makes skipping easy with boost.regex.