The simplest way is to put in in pre tags (if you watch for <> brackets).
Do yourself a favour......dont waste time on it......
Go to Sunlight's site....he has some little console app he wrote that converts c/c++ files to html...
Isn't there any way to export to html on MVC++ like DevC++ does?
don't know but if you do <xmp> hten everything inside of the opening and closing tags ts not changed from how you typed it.