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:

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
plugin
that use the “<pre lang=”C++”/>” tag