C++ Introduction
C++ is a statically typed, compiled, general-purpose, case-sensitive, irregular programming language that supports procedural programming, object-oriented programming, and generic programming.
C++ is considered aIntermediateThe language combines the characteristics of high-level and low-level languages.
C++ was designed and developed by Bjarne Stroustrup at Bell Labs in Murray Hill, New Jersey, in 1979, further expanding and improving the C language, and was initially named withClass CLater, in 1983, it was renamed to C++.
C++ is a superset of C. In fact, any legal C program is a legal C++ program.

Note:A programming language that uses static typing performs type checking at compile time, rather than at runtime.
Object-oriented programming
C++ fully supports object-oriented programming, including the four major characteristics of object-oriented development:
Encapsulation: Encapsulation is combining data and methods together, hiding implementation details from the outside, and only exposing the interfaces provided externally. This can improve security, reliability, and flexibility.
Inheritance: Inheritance is deriving a new class from an existing class. The new class has the attributes and methods of the existing class, and can extend or modify these attributes and methods. This can improve code reusability and extensibility.
Polymorphism: Polymorphism means that the same operation acting on different objects can have different interpretations and implementations. It can be implemented through interfaces or inheritance, which can improve the flexibility and readability of code.
Abstraction: Abstraction is the process of extracting common features from concrete instances to form abstract classes or interfaces, facilitating code reuse and extension. Abstract classes and interfaces allow programmers to focus on high-level design and business logic without worrying about low-level implementation details.
Standard Library
The standard C++ consists of three important parts:
- Core language, providing all building blocks, including variables, data types, and constants, etc.
- C++ standard library, providing a large number of functions for manipulating files, strings, etc.
- Standard Template Library (STL), providing a large number of methods for manipulating data structures, etc.
ANSI standard
The ANSI standard is to ensure the portability of C++ — the code you write can be compiled on Mac, UNIX, Windows, and Alpha computers.
Since the ANSI standard has been stable for a long time, all major manufacturers of C++ compilers support the ANSI standard.
Learn C++
To learn C++, the key is to understand concepts, and one should not delve too deeply into the technical details of the language.
The purpose of learning a programming language is to become a better programmer, that is, to be able to design and implement new systems more efficiently, as well as maintain old systems.
C++ supports multiple programming styles. You can write code using the style of any language, such as Fortran, C, or Smalltalk. Each style can effectively ensure runtime efficiency and space efficiency.
Using C++
The C++ language is widely used in many industries and fields, including:
Game development: C++ is one of the most commonly used programming languages in the field of game development because of its high performance and ability to directly control hardware. Many major game engines, such as Unreal Engine and Unity, are written in C++.
Embedded systems development: C++ can play an important role in embedded systems, such as smartphones, automobiles, robots, and home appliances. Since embedded systems usually have strict resource constraints and real-time requirements, C++'s high performance and memory control capabilities are very useful.
Finance: C++ is widely used in the financial field, such as high-frequency trading, algorithmic trading, and risk management. Since these applications require high performance and direct control of hardware, C++ is a suitable choice.
Graphics and image processing: C++ can be used to develop graphics and image processing applications, such as computer vision, computer graphics, and artificial intelligence. Since these applications require efficient computing power and control over hardware, C++ is a very good choice.
Scientific computing and numerical analysis: C++ can be used to develop scientific computing and numerical analysis applications, such as numerical simulation and high-performance computing. Since these applications require efficient computing power and direct control of hardware, C++ is a very good choice.
Standardization
| Release date | Common name | Notes |
|---|---|---|
| 2020 | C++20, C++2a | ISO/IEC 14882:2020 |
| 2017 | C++17 | The fifth C++ standard |
| 2017 | coroutines TS | Coroutine library extension |
| 2017 | ranges TS | Providing scope mechanism |
| 2017 | library fundamentals TS | Standard library extension |
| 2016 | concurrency TS | Extensions for concurrent computing |
| 2015 | concepts TS | Concepts library, used to optimize compile-time information |
| 2015 | TM TS | Transactional memory operations |
| 2015 | parallelism TS | Extensions for parallel computing |
| 2015 | filesystem TS | file system |
| 2014 | C++14 | The fourth C++ standard |
| 2011 | - | Decimal floating-point extensions |
| 2011 | C++11 | The third C++ standard |
| 2010 | - | Mathematical function extensions |
| 2007 | C++TR1 | C++ Technical Report: Library Extensions |
| 2006 | - | C++ Performance Technical Report |
| 2003 | C++03 | The second C++ standard |
| 1998 | C++98 | The first C++ standard |