C++ is a compiled, statically typed, general-purpose programming language.
It supports such programming paradigms as procedural programming, object-oriented programming, generalized programming, provides modularity, separate compilation, exception handling, data abstraction, declaration of object types (classes), virtual functions. The standard library includes, among other things, commonly used containers and algorithms. C++ combines the properties of both high-level and low-level languages. Compared to its predecessor, the C language, the most attention is paid to the support of object-oriented and generalized programming.
C++ is widely used for software development, being one of the most popular programming languages. Its application area includes creating operating systems, a variety of application programs, device drivers, embedded system applications, high-performance servers, and entertainment applications. There are many C++ implementations, both free and commercial, for various platforms.
Where is C++ used?
Programmers distinguish three areas in which the advantages of the language are best revealed:
Optimization. Rewrite any code from a higher-level language into C++ to make the program run faster. This is often done in the sphere of deep learning and other algorithmic areas where speed is important. But it is not always to the benefit: sometimes fast development is important for productivity, or the benefit of porting code to C++ is quite insignificant.
Graphics. Indie-games often use high-correlated languages and game engines (C # and Unity, Java and jMonkeyEngine), but it is possible to create games in C++ on the same Unreal Engine. Many AAA-class games are written in C++ because top games need to be optimized well, and this language is very flexible for this. But at the same time it is easy to write in OOP-styles without descending to a very low level. Another advantage, which is recognized by APEPS graduates, is the use of its own engine for full control of any game mechanics. The game works well on all supported devices. The code is written so as to optimize compilation into binary files on different platforms.
GPU-calculus. Nvidia CUDA and OpenCL are two platforms that allow you to run C++ code on a graphics processor. GPUs contain hundreds of small computing cores that can perform simple mathematical operations at the same time. Writing code for GPU, you can get very high productivity and speed. C++ is perfectly suited for this.
Among the possible applications we can mention:
- Bitcoin mining;
- Learning neural networks: most of Deep Learning libraries use C / C++ code on CUDA or OpenCL to learn neural networks and work faster. However, a lot of functions are available both in C++ and in more highly correlated languages;
- Shaders for igames and graphical PZ. Shaders are small code fragments that are run on GPU in parallel and perform complex graphical tasks (e.g., trace swaps).