C++ is a general-purpose, multi-paradigm programming language created by Bjarne Stroustrup in the early 1980s.
This language is based on the popular language C, which at the time was “the best of the best.” This means it inherits many of C’s characteristics and tries to be compatible with the syntax, as much as possible.
But C++ adds new functionalities compared to C. In particular, it adds object-oriented programming (OOP), being one of the first references in this paradigm.
In fact, the name C++ comes from the ”++” operation in C, which is used to increment the value of a variable by 1, indicating that it is an “evolved version” of C (a little joke by programmers that came up with it).
Despite the years, “the old man” C++ language is still widely used. It is a very powerful and versatile programming language that gives us great control over hardware and system resources. In exchange, it is more complicated than other modern languages.
On the other hand, C++ has been a language that has evolved a lot. Normal, it is 40 years old, how could it not change? However, it is one of the languages that is poorly used and poorly taught, because it is done… well, just like it was 40 years ago.
So in this course we will learn to use C++, and we will “lose our fear of it.” At the same time, we will try to explain the modern features of the language, and how to use them today.
Main features of C++
C++ stands out for a combination of high-level and low-level in a single language. You can use high-level abstractions, but also write low-level code for critical tasks when necessary.
On one hand, C++ has full support for object-oriented programming (OOP) (it allows the use of classes and objects, abstractions that enable us to model real-world entities in code).
However, C++ maintains access to low-level features, such as pointers and direct memory management (that is, it allows very close control of hardware and system resources).
As a result, C++ is known for being a high-performance language. In general, C++ code tends to be very fast in execution. So much so that it is often marked as a reference for “what is fast.”
Additionally, C++ is a portable and cross-platform language. Code written in C++ can be compiled and run on a wide variety of platforms and operating systems.
Finally, C++ is a multipurpose language. That is, it can be used to create any type of application, without being restricted to a single field or domain. You can use it for all kinds of programs, as we will see next.
Application fields of C++
As mentioned, C++ is characterized by the combination of high-level and low-level. This makes it ideal for applications that require efficiency and control over system resource usage (or when resources are very limited).
Some examples are:
- Operating systems and system kernels
- Compiler and debugger development
- Embedded systems and devices
- Systems with large volumes of data
- Artificial intelligence, computer vision, and machine learning
- Video games and graphical applications
That’s quite something! That is to say, it is a very interesting language, which allows us to learn the fundamentals of programming, as well as participate in a huge number of projects.