Blockland Forums > General Discussion
print "Hello World!"
<< < (7/16) > >>
$trinick:

--- Quote from: Pacnet on February 25, 2014, 10:09:29 PM ---3: Iostream (std::cout << x) is better than printf

--- End quote ---
I don't think you realize what the difference between iostream and printf is. printf is for the insertion of variables into a line of text, there is no "better" or "worse." In this scenario, printf would be an improper invocation because there is no variable to insert. cout is not inherently better because it doesn't perform the extra steps of variable insertion, it's actually quite inferior if you're going to be attempting this.

"sorry, I had to!"
Port:

--- Quote from: Pacnet on February 25, 2014, 10:09:29 PM ---1: There's no semicolon on line 5
2: You should not return 42 for main(), a common practice is to return 1
3: Iostream (std::cout << x) is better than printf

--- End quote ---

2: Why would you return 1 if everything went fine? Return 0.
3: How so? Who says that it's C++ instead of C anyway? Looks like C to me.
Yosher:
Why is this a coding thread?

Anyways, hi.
Snaked_Snake:
Welcome to hell heaven.

What would you like? Maybe a drama burger for you?
Ooh, how about flame war stew?
Maybe even a hate cola?

K3k0m@n:

--- Code: ---messageAll('',"Hello World!");
--- End code ---
I best coder
Navigation
Message Index
Next page
Previous page

Go to full version