Resources you need for learning C++

Resources you need for learning C++

C++ is a programming language based on C. It was created for writing programs for many different purposes. In the 1990s, C++ became one of the most used programming languages in the world.

The C++ programming language was developed by Bjarne Stroustrup at Bell Labs in the 1980s, and was originally named "C with classes". The language was planned as an improvement on the C programming language, adding features based on object-oriented programming. Step by step, a lot of advanced features were added to the language, like operator overloading, exception handling and templates.

Advantages and Disadvantages of C++

Every coin has two sides. Before going to the programming resources let us look at some of the advantages and disadvantages of using C++.


Advantages of C++

       1] Portability

C++ offers the feature of portability or platform independence which allows the user to run the same program on different operating systems or interfaces at ease.

Suppose you write a program in LINUX OS and for some apparent reason you switch to Windows OS, you would be able to run the same program in windows as well without any error. This feature proves to be of great convenience to the programmer.

        2] Object-oriented

One of the biggest advantages of C++ is the feature of object-oriented programming which includes concepts like classes, inheritance, polymorphism, data abstraction, and encapsulation that allow code reusability and makes a program even more reliable.

Not only this, it helps us deal with real-world problems by treating data as an object. C lacked this feature and hence it was created, proving to be of great significance. 

       3]  Multi-paradigm

C++ is a multi-paradigm programming language. The term “Paradigm” refers to the style of programming. It includes logic, structure, and procedure of the program. Generic, imperative, and object-oriented are three paradigms of C++.

Let us now try to understand what generic programming means. Generic programming refers to the use of a single idea to serve several purposes. Imperative programming, on the other hand, refers to the use of statements that change a program’s state.

       4] Low-level Manipulation

Since C++ is closely associated with C, which is a procedural language closely related to the machine language, C++ allows low-level manipulation of data at a certain level. Embedded systems and compiler are created with the help of C++.
  
       5] Memory Management

C++ gives the programmer the provision of total control over memory management. This can be considered both as an asset and a liability as this increases the responsibility of the user to manage memory rather than it being managed by the Garbage collector. This concept is implemented with the help of DMA (Dynamic memory allocation) using pointers.
      

Disadvantages of C++

       1] Use of Pointers

Pointers in C/C++ are a relatively difficult concept to grasp and it consumes a lot of memory. Misuse of pointers like wild pointers may cause the system to crash or behave anomalously.

       2] Security Issue

Although object-oriented programming offers a lot of security to the data being handled as compared to other programming languages that are not object-oriented, like C, certain security issues still exist due to the availability of friend functions, global variables and, pointers.

       3] Absence of Garbage Collector

As discussed earlier, C++ gives the user complete control of managing the computer memory using DMA. C++ lacks the feature of a garbage collector to automatically filter out unnecessary data.

       4] Absence of Built-in Thread

C++ does not support any built-in threads. Threads is a relatively new concept in C++ which wasn’t initially there. Now, C++ is capable of supporting lambda functions.

If you are new to programming, it doesn't matter. In fact for an entry-level programmer, from my experience, I can confidently say that if you are looking for a programming language to start, C++ is the best choice.

Below I have attached links to the books you should buy to learn C++:














Comments