Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

can perltidy format C/C++ files

Posted on 2007-11-23
4
Medium Priority
?
629 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 2000 total points
ID: 20341146
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

885 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