Hello
This is going to be your first C++ program. This will be the 'Hello World' program. It may look fairly unimpressive now but you have to learn it for later on. Okay! Lets get started.
the first section of this our program:
- Quote :
#include
int main ()
{
using namespace std;
This section contains the library (
) which gives C++ the commands to use and the rest you dont need to know what it is! but you do need it so learn it.
- Quote :
cout << "Hello World";
This cout command tell the computer to output what is in the "" which in this case is "Hello World". The ; is to tell the computer that statment is over and it can move on.
- Quote :
system("pause");
return 0;
}
The pause line is to stop the computer running through it and exiting. This gives you the option to actually read the output. The return you don't need too know. The } is becasue every parenthesi you open you must close and we opened it on line 3 so we must close it.
Thats your basic output command. You can experiment with that until the next tutorial where we will be dealing with variables and user defined inputs and set inputs.