views:

121

answers:

3

In C++ Builder, how can I make sure that even correctly nested code like:

void func () {

...
..

)

C++ Builder correctly nested only doing so:

void func ()

{

...
...

}

This is very stressful, because I always have to correct by hand. So how can I make which indents code as well in the first instance?

A: 

I don't have a copy of this to run, but the documentation mentions "Indentation, Spaces, and Line breaks" as some of the options under the formatter tab of the "Tools > Options" dialog.

What you're looking for is probably under the "Line Breaks" section.

Glen
A: 

I tried to change those settings, but the problem persists

JonnyIlRosso
Welcome to Stack Overflow, Jonny. What you've posted here is supposedly an *answer* you *your question* — you had to click the "answer your question" button to get there — but it clearly isn't. Please use the "add comment" link below an answer to respond to somebody else's answer. If you have additional information that would make the question more clear, then use the "edit" link below the question. Consider deleting this answer and re-porting it as a comment, lest other people vote you down for this non-answer.
Rob Kennedy
+1  A: 

The code formatter in C++Builder 2010 should do this automatically for you. (It is invoked with CTRL-D) You’ll have to set the preferences to how you like your code to be formatted, but this is a real time saver new with this most recent release.

David Dean - Embarcadero
I mean, when i typing words, and i'm going to do a block {} if i don't put down the { in a new line, the indentation results incorrent because when i press enter the caret are after the }, so i must give a new line. When i'm coding too, this is so tedious
JonnyIlRosso