I am looking for an easy way to print out a specific function from within some C/C++ source code. For example, assume that test.c has several functions defined within it. I want to be able to print out the source code associated with only one of those functions.
Edit: Sorry, I should be a bit more clear about my end goal. I want the function printed to the screen so I can use wc to grab the word count of this specific function. Also, I want this be part of a command line tool-chain so it isn't an option to manually enter files and select the text.
You can run your project through doxygen. It will index all your functions (and classes, structs etc) and can make them available in multiple formats (including PDF and HTML, both easily printable).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With