Hello world C++

By ChunkieMonkey on Aug 26, 2008

THIS is my first C++ script.

//My compiler was dev C++ my bloodshed
//Simple Hello World Snippet

#include <iostream>

using namespace std;
int main();
{

cout << "Hello world!";
System("pause");

}

Comments

Sign in to comment.
[HANZam]   -  Aug 04, 2009

your using C++ right where's return 0;?? you should have return 0; in your script or else your program will have syntax error.

 Respond  
PATX   -  Aug 02, 2009

fixed, i think... have not coded msl in months!

 Respond  
Y4kuzi   -  Aug 01, 2009

PATX, your MSL script is incorrect, lol
You have a typo. Complicated heh? xD

 Respond  
PATX   -  Apr 27, 2009

??? a hello world??? wow that is complicated.... i only know 2 hello worlds:\

python:
print'Hello World'

msl (mirc scripting lang)
on :text::#: { msg $chan Hello World } ; or use echo....

 Respond  
frishy   -  Jan 09, 2009

just a few tips :) :
using namespace means you're including std (since u stated std) to be used.
you can also do:

using std::cout;

if you're just using cout, which wud be more efficient if you're not using alot of std comands.

Also adding \n (when its in quotes will mean if you cout another message it well be on a new line). There is a different way but i prefer this so it would look like this:
cout << "Hello world! \n";

Keep up the good work :)

 Respond  
Viper01   -  Jan 09, 2009

Technically not "Yours" since its available EVERYWHERE and in beginning tutorials as well.

 Respond  
ChunkieMonkey   -  Aug 26, 2008

Scores and no comments?

 Respond  
ChunkieMonkey   -  Aug 26, 2008

. If you read EL's comment maybe you would understand why my proxy box got a low score retart

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.