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: Eric Allman 2008-08-26 19:10

The correct way is all braces on their own line and 4 space indents. Don't let trolls tell you otherwise.

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