Statua
Would you like to react to this message? Create an account in a few clicks or log in to continue.


Welcome To Statua. Feel free to message any of our staff.
 
HomeLatest imagesSearchRegisterLog in

 

 Your First C++ Program

Go down 
AuthorMessage
alex
Admin
Admin
alex


Posts : 28
Points : 10048
Rep : 2
Join date : 2010-06-18
Age : 30
Location : uk

Your First C++ Program Empty
PostSubject: Your First C++ Program   Your First C++ Program Icon_minitimeSat Jun 19, 2010 2:05 am

Hello Smile 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.
study
Back to top Go down
http://statua.co.cc
 
Your First C++ Program
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Statua :: Coding :: C++ / C#-
Jump to: