I'm not sure if this is the right place to post this question but here goes.
I would like to write a C++ parser that can take .h and .cpp files and give me a listing of functions and variables that are stored in those files. Does anyone have suggestions on how I can do this?
3D OpenGL, C++ Game Development Video Tutorials @
www.marekKnows.com
search for some open source c++ compiler, and use it's code parsing capabilities, or
search for some open source c++ IDE, and learn how it understands c++ code.
Do you want to do this programmatically using Java? If so, check out the eminent parser generators (JavaCC, Antlr, SableCC) - one of them is bound to have a ready-made grammar for C++ that you can use.