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

Share | 
 

 Your First C++ Program

View previous topic View next topic Go down 
AuthorMessage
alex
Admin
Admin
avatar

Posts : 28
Points : 10048
Rep : 2
Join date : 2010-06-18
Age : 23
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 :

#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
View user profile http://statua.co.cc
 
Your First C++ Program
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» program to provide total number of objects present / available on the page
» Has anyone read "Heal Your Headache" please?
» Getting the error msg 'Error: Could not find or load main class java-jar' while executing the selenium code in eclipse
» Unable to play recorded test cases in Selenium IDE
» Freeware Program Collection

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