Blockland Forums > General Discussion
print "Hello World!"
LegoFish:
--- Quote from: Legoboss on February 25, 2014, 10:00:58 PM ---Hello. Prepare for people posting ALTALTLALT
Try not to be stupid.
--- End quote ---
I'm not an alternate account, but I'll be aware.
Pacnet:
welcome to the blockland community. don't make any mistakes because if you do then people will bandwagon and bash you for it even if time advances by five years. I learned this the hard way.
--- Quote from: Jakobblockhead on February 25, 2014, 10:02:32 PM ---
--- Code: ---#include <stdio.h>
int main()
{
printf("Hello LegoFish, welcome to Blockland Forums")
return 42;
}
--- End code ---
--- End quote ---
1: There's no semicolon on line 5
2: You should not return 42 for main(), a common practice is to return 0
3: Iostream (std::cout << x) is better than printf
EDIT: Sorry. I just had to...
Advanced Bot:
--- 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: Printf uses the cstdio library
4: Iostream (cout << x) is better than printf
--- End quote ---
wat
Jakobblockhead:
anyways welcome Legofish
Ipquarx:
--- 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: Printf uses the cstdio library
4: Iostream (cout << x) is better than printf
--- End quote ---
5. why are you judging someone's c++ code
6. you need to add in using namespace std; in order to use the code "cout << x;", otherwise you need to use std::cout << x;