Whether we're maintaining unfamiliar code or checking out the implementation details of an Apache module it can help if we can quickly traverse the code and build up an overview of what we're looking at. Grep serves most of my daily needs but there are some cases where it just wont do.
Here's a common example of how it can help. To find the definition of a PHP function I'm interested in I can type this at the command line:
grep -r "function myfunc" .
This could be adapted very quickly to C or C++ if we know the return type, but things become more complicated if, say, I want to list every method that my class provides:
grep "function " ./src/mine.class.php
Since there's no single keyword that denotes a function or method in C++ and because it's generally more complex syntax, I think I'd need some kind of static code analysis tool, smart use of the C Preprocessor or blind faith the coder followed strict code guidelines (# of whitespace, position of curlies etc) to get these sorts of results.
What would you recommend?
p.s. be nice, this is my first post ;-) :p