Is there a program that generates nicely formatted HTML that depicts C++ code?
i.e. I have a C++ code fragement that looks like:
void userCode(Fred& x, Fred& y)
x = y; // Could be self-assignment if &x == &y
And the program should generate the following HTML:
void userCode(Fred& x)<br>
x = x; </tt><em>// Self-assignment</em><tt><br>
I suppose the main issues is you have to force spaces ( ) for all indents and do a line break (<br>) for each line.
If anyone knows of a utility that is already out there, it would be most helpful.