Formatting C++ code to html (mac, linux)

Hmm, it turns out turning C++ code into html is both harder (nothing obvious) and easier (a great tool) then you’d expect. For the previous post on expanding $var I just used:

enscript -B -E -u "" -T "" --language=html --color Strings.cpp -p ~/Strings.cpp.html

and copied the resulting html into the post.
The coolest thing I found was GeSHi (Generic Syntax Highlighter) which is written in php and so more suitable for web sites.
If I were using WordPress, there’s a
that use the “<pre lang=”C++”/>” tag