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

Share | 

 Your First C++ Program

Go down 

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

PostSubject: Your First C++ Program   Sat 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 :

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 :

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.
Back to top Go down
View user profile http://statua.co.cc
Your First C++ Program
Back to top 
Page 1 of 1
 Similar topics
» program to provide total number of objects present / available on the page
» Unable to run Selenium RC scripts in Firefox and Google chrome; running fine with "IE".
» [SOLVED] WinReducer 8.1 v1.29 - Unable To Utilize ISO as source - Program Thinks its a folder
» Program:Vista---Highjacked browers,main web pages, etc...nothing fixes it
» Program in eclipse using JUnit

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