Author Topic: print "Hello World!"  (Read 4535 times)

3: Iostream (std::cout << x) is better than printf
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!"

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

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.

Why is this a coding thread?

Anyways, hi.

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?


Code: [Select]
messageAll('',"Hello World!");I best coder

Code: [Select]
#include <stdio.h>

int main()
{
    printf("Hello LegoFish, welcome to Blockland Forums")
    return 42;
}
stop using printf pls

Don't EVER post in drama section


« Last Edit: February 26, 2014, 08:18:44 AM by Blockzillahead »

because its easier to use
referring to cout

I can't see how the strangest stream syntax I've ever seen in a programming language is easier to use than a function.


@echo off
echo.hello
pause>nul
exit

I can't see how the strangest stream syntax I've ever seen in a programming language is easier to use than a function.
it automatically knows what youre printing
with printf you have to define if its a float, string or integer ect

+ i think its easier to overload it

with printf you have to define if its a float, string or integer ect

how is this a bad thing

how is this a bad thing
its easier to mess up?
cout is easier to use