Solved

can perltidy format C/C++ files

Posted on 2007-11-23
4
613 Views
Last Modified: 2008-02-01
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?
0
Comment
Question by:dwcronin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 20340101
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.
0
 
LVL 40

Expert Comment

by:evilrix
ID: 20340272
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.
0
 

Author Comment

by:dwcronin
ID: 20341119
Sorry I didn't say it  My job only uses Linux.

0
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 20341146
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question