Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

C++ - Hello World (See related posts)

/*
 * 
 * Semplice esempio di Hello World !!!
 */

#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
	cout << "Hello World !!!" << endl; // endl equivale ad un \n
	
	return 0;
}

Comments on this post

mloskot posts on May 14, 2006 at 09:49
Here is my version with small fix.
New C++ coders should be careful with using directive, so it's good to learn a right way to code in C++:

int main(int argc, char *argv[])
{
using std::cout;
using std::endl;

cout << "Hello World !!!" << endl; // endl equivale ad un \n

return 0;
}
whitetiger posts on May 14, 2006 at 22:07
Thanks for the correction, but in this way you include alone the necessary one?

You need to create an account or log in to post comments to this site.


Click here to browse all 4861 code snippets

Related Posts