Sign in to follow this  
Boder

Bracket Conventions

Recommended Posts

Sorry to be a copycat, but I just have to know which style most people use for coding in C/C++. With all these debate threads (naming conventions, char* vs. string), I thought maybe we should talk about something that really matters [wink]. Brackets! Also do you use tabs or spaces for indentation. I use: [cool]
function()
{
     // Tab
}


I like the way the brackets line up.

Share this post


Link to post
Share on other sites
I use this:


int Blah( int thing0, int thing1, int thing2 )
{
thing0 = thing0 + ( thing1 * thing2 );
somearray[ thing2 ] = thing1 / thing0;

return SomeFunc( somearray[ thing2 ] );
}




I seperate almost everthing with a space so as that the code is clean and easy to read.

Share this post


Link to post
Share on other sites
Presumably, you've all hit a brick wall with your projects if you've got time to reply to this thread...


Yes, i have hit a brick wall.

I'm entering the "More Coffee" phase of development, quickly approaching the "I Hate Stupid Vertex Buffers" phase.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this