Introduction to C++


C++

C++ For Beginners

Hello guys welcome to the article on C++ programming language with this text we are starting a fresh article series on programming language and this text series is specially designed for absolutely the beginners you do not need any programming experience to urge started but if you happen to possess some programming knowledge then it'll definitely help alright .

Now during this article we'll see what exactly is C purpose and when it had been created why it had been created you recognize a touch information about the history of this hip-distance so first of all what exactly is C++ now all of you recognize that a computer is an device which will perform many computational tasks but since it's a machine these computers they really can't do anything on their own so to urge any job done using the pc we'd like to offer instructions to the present computer and consistent with our instructions this computer will work these instructions which are given to the present computer are called because the Program and therefore the one that goes to write down these instructions or who goes to offer these instructions is named an C programmer.

Now the language during which these instructions are written or these programs are written is named because the programming language so here the programmer will use any of the programming language available and write the pc program or the instructions and consistent with this program the pc will work so here C++ is one among the programming language which will be wont to write the pc programs there are tons of programming languages available

For example we've C we've C sharp we've Java we've PHP you recognize we've Python you recognize tons of programming language s are available and C++ is one among the programming language.

All right now subsequent thing is why the C++ was created and when it had been created the C++ programming language was created by Johnny's prostrobe and his team in 1979 at the Bell Laboratories of latest Jersey now when this language was created they didn't directly called it as C++ instead they called it as C with classes during the 1970s.

C programming language was one among the foremost used and therefore the refore the hottest programming language and even to the present day C programming language is one among the foremost famous programming language but C programming language had its own limitations year by year the computational capacity of the computers increased and also the programming complexity increased now the matter with C programming language was because the programming complexity increased and the programs tend to become larger it had been difficult to manage and write the code using the C language for those complex computational tasks.

So John and his team they started performing on the C programming language they added tons of features.

The main feature they added was the Object-Oriented Programming feature then they created this new language called as C with classes now here this class it's actually a neighborhood of the object-oriented programming this object-oriented programming is a completely different programming approach from the programming approach utilized in the C language and heal the object-oriented programming feature which was added to the present C with classes was mainly influenced by another object oriented programming language which was existing during that point called because the similar 67 now this new language C with classes.

You know it had the features from two great programming language s you recognize it handy features from the C programming language and also it had some features from this 67 now the new language which was created you recognize which is that the C with glasses was a far better choice for writing the programs where the programmers need to perform some complex R programming operations and then in 1983. They renamed this C with classes with C++ now here the interesting thing is that this plus plus it's actually an operator from the C language and this plus plus is an increment operator and here since this new language is an implementation or subsequent step of the C language you recognize they named it as c plus plus so this is often often it guys this is about some information about what exactly is C++ and about its history.

Syntax and Structure of C++

Here we will discuss a simple and basic C ++ program to print "Hello this is C ++" and its structure in parts with details and uses.

First C++ Program

#include <iostream.h>

using namespace std;

int main()

{

 cout << "Hello this is C++";

}

The Header files are initially included just like a C program. Here iostream is a header file that provides us with input and output streams. The header files have predefined function libraries, which users can use for convenience.

Using std namespace, it tells the compiler to use the standard namespace. Namespace collects the identifiers used by class, object, and variable. Namespaces can be used in a program in two ways, either initially using the directive, as we did in the program mentioned above, or by using the namespace name as a prefix before the scope resolution identifier (: :) operator.

Example: std :: cout << "A";

main () is the function that contains the running part of the program whose return type is int.

cout <<, it is used to print anything on the screen, as printf in C language. Cin and cout are similar to scanf and printf, the only difference being that there is no need to refer to format identifiers, such as % d for int, etc., in cout and cine.