Learn More

Friday, August 5, 2011

Get Software And First Tutorial of C++

Before we discuss about c + + Further, it helps when preparing software to c + + first. To that end, please visit our post entitled Get Software And Graphics To Create A Game on how to obtain software CodeBlocks. If you've managed to download it, please install CodeBlocks on your computer.

When you have successfully installed now run CodeBlocks. Then Select File -> New -> Project. Then you will see the application window New from template.

new from template

In the Category you select the Console application, so it would appear Console application window application. Then click Next, then select the language programe c + + and click Next.

console application language

Then you will be asked to give the project title and location of the storage project. Our suggestion is, create a new folder inside the folder of CodeBlocks, name the folder as projects. And save all your projects in that folder.

Ok, so this tutorial with you, please give the name of your folder with the name learncpp1, then click Next. Next you will be prompted to select a compiler. Please select a GNU GCC compiler, and then click finish.

Then you will see a code c + + standard. The code is always the same when you create a file from the console application.

learncpp one project

Please run by pressing F9 or by clicking Build -> Build and run. So it will be seen the results Hello world! in the command window.

The following is a brief explanation of the program.

# include <iostream>

This code aims to involve the iostream library. While the definition of iostream is abbreviation of the input / output stream. The purpose of this library is to provide the capability to perform input and output operations.

using namespace std

Using namespace code aims to make it possible to group entities like classes, objects and functions under the name. And the name is of this project is std.

int main ()

Is the parent operation c + +, this is where c + + execution.

cout <<"Hello world!" <<Endl;

It aims to display the output in the form of the word Hello world!, While endl aims to provide a new line in the output if any.

Post a Comment