C++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented, functional, and so on. This makes C++ powerful as well as flexible.
An integrated development environment (IDE) is a software application that provides necessary tools for computer programmers for software development. It contains both an editor and compiler. Some examples of C++ IDE include Eclipse, CodeLite, Sublime Text, NetBeans, Qt Creator, Brackets, Atom, and Dev C++.
For this guide we are going to use Dev C++. The latest version of the Dev C++ software can be downloaded from the official website: www.bloodshed.net. It is free and open-source software.
A #include directive allows you to merge the source code in one file with that in another file.
The #include
A using directive tells the compiler where in internal memory it can find definitions of C++ keywords and classes like double or string.
The using namespace std; directive indicates that the definitions of the standard C++ keywords and classes are located in the std (standard) namespace. It is a statement, so a semicolon is required at the end. A namespace is a special area in internal memory. Figure 1.2 shows the parts of the program.
The main function is also called the driver function which controls all the other functions in the program.
It contains the following components:
Compiler saves object code in object files with extension .obj. Linker combines .obj files with other machine code necessary to run the program and produces an executable file with extension .exe. This is shown in Figure 1.3.