Solved

can perltidy format C/C++ files

Posted on 2007-11-23
4
558 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
  • 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now