Solved

can perltidy format C/C++ files

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
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 viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

770 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