dhscpp

 

HelloWorld

Page history last edited by Anonymous 2 yrs ago

HelloWorld is a standard first program in many languages.

It is always a very simple program, hard to screw up, but shows that the system works.

 

Type, don't copy and paste!

You should personally type each piece of code you come across. This will help you understand how to do it, and will help you recognize your mistakes.

 

Here is a version of Hello.Cpp that should work for you:


 

//My first program

//Mr. Connors

//1/28/08

 

#include <iostream> //this includes a whole program so you don't have to type it

 

using namespace std;

 

int main() //This is a function called main()

{ //This is a brace, it opens main()

 

 

cout << "Hello World!n"; //This prints Hello World! on the screen

 

system("Pause"); //This has the program wait for you before ending

 

} //this ends main

 


Comments (0)

You don't have permission to comment on this page.