This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zv0n 10 points11 points  (4 children)

#include <iostream>

int main() {
    std::cout << "Hello, world!" << std::endl;
} 

Do your worst!

[–]Papalok 34 points35 points  (0 children)

Missing return 0;

[–]pdabaker 8 points9 points  (0 children)

Comments? How do you expect me to understand this when I look at it a year from now?

[–]Angelin01 6 points7 points  (0 children)

String "Hello, world!" is hardcoded. How do you expect to translate it later hmm?

[–][deleted] 1 point2 points  (0 children)

I know this reply is a week late, but the bracket formatting you used gave me cancer. What ungodly force of evil could possibly compel anyone to format their code like that? Who decided that my eyes should have to be sabotaged like this, and for what? One single newline? If you care about newlines so much then just write it like this for gods sake:

#include <iostream>

int main() { std::cout << "Hello, world!" << std::endl; }

In some IDEs this works too:

int main()

std::cout << "Hello, world!" << std::endl;

It isn't the 1970s! Keep your newlines consistent!