I am working on a C++ project and using Eclipse as the IDE. The coding standards for the project specify indenting the initial and closing braces for a function, as in:
int main()
{
return 0;
}
Is there an option in Eclipse 4.3.1 to automatically indent this way?
Use the main menu to Navigate to Window->Preferences.
On the resulting dialog, expand your way to C/C++->Code Style->Formatter. Set Active Profile to Whitesmiths and edit to taste.
For example, it looks like you want to set Indentation size and Tab size on the Indentation tab to 2.