Link to home
Start Free TrialLog in
Avatar of dwcronin
dwcroninFlag for United States of America

asked on

can perltidy format C/C++ files

Can I format a C++ file wth perltidy?  My C++ file has comments like:

//-------------------------------------------------------
//                Header
//-------------------------------------------------------

Perltidy screws this up.  It works REAL well with vi to format much
of the code but it seems to have trouble with comments.  Is there
a cpptidy or some flag I can set to fix this?
Avatar of jkr
jkr
Flag of Germany image

Well, there are C++ beautifiers out there: http://www.faqs.org/docs/Linux-HOWTO/C-C++Beautifier-HOWTO.html#

As for perltidy, maybe http://www.perlmonks.org/?node_id=619780 helps.
Visual Studio 2005 Express does a reasonable job of prettifying code. You just open the file, CTRL-A to select all CTRL-K+ CTRL-F to format it.
Avatar of dwcronin

ASKER

Sorry I didn't say it  My job only uses Linux.

ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial