Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ structure?

Name: Anonymous 2008-08-26 18:59

What's the correct structure for coding? Where are you supposed to put the braces "{}" at? When and where are you supposed to indent or use blank spaces?

This:

int main(){
  cout << "Hello World!";
  return 0;}


or this:
int main()
{
  cout << "Hello World!";
  return 0;
}

Is there a tutorial or book for this?

Name: Anonymous 2008-08-26 23:05

The correct way is Anonix, of course. 1 space, braces together with whatever they open and alone onlly if they are closing something not followed by else or do...while, no spaces after function names nor after statement names, no spaces inside parens, and no space around any operators.

Also, ttp://rechan.eu.org/misc/anoncoreutils/CODEGUIDELINES

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List