The output we get when printing C++ sources from Eclipse is rather ugly.
Is there are way/a plugin to pretty print C++ source code like e.g. with a2ps (which is probably using yet another filter for C source code)?
The output we get when printing C++ sources from Eclipse is rather ugly.
Is there are way/a plugin to pretty print C++ source code like e.g. with a2ps (which is probably using yet another filter for C source code)?
I also use enscript
for this. Here's an alias I often use:
alias cpp2ps='enscript --color --pretty-print=cpp --language=PostScript'
and I use it like this:
cpp2ps -P main.ps main.cpp
There are several other great options in enscript
including rotating, 2-column output, line numbers, headers/footers, etc. Check out the enscript man page.
Also, on Macs, XCode prints C++ code very nicely.