Author Topic: Formatting Help. Indentation of braces with new functions.  (Read 3685 times)

Offline christian25555

  • Single posting newcomer
  • *
  • Posts: 2
Formatting Help. Indentation of braces with new functions.
« on: February 01, 2013, 09:05:58 am »
Hello, I am pretty new to the Code::Blocks IDE. More used to Visual Studio, but since my professor is going to be using this IDE I decided to give it a try.

I have a pretty simple problem that I hope to resolve:

I usually format my functions as:

Code
void foo(){
    //declarations

   //code//
}

However when it does the auto braces it shows up without any indentation as

Code
void foo(){
}

Which is pretty annoying. The for loops in Code::Blocks formats the way I want my functions to format automatically:

Code
for(int k = 0; k < 10; ++k){
    //code
    //code
}

I am just looking for a way for this to work more easily. I am pretty sure it has to do with the auto brace completion because when I turn it off it gives me the indent I want, however the auto brace is also a good feature. It works perfectly for for loops, I'm just not sure whats up with the function calls.

Thanks!

Offline christian25555

  • Single posting newcomer
  • *
  • Posts: 2
Re: Formatting Help. Indentation of braces with new functions.
« Reply #1 on: February 05, 2013, 05:13:58 am »
any insight?