[C++] Introduction to C++ and its development history




1. What is C++ and why does C++ appear?

C language isstructuredand modular< /span>, C language is not suitable. When modeling and a high degree of abstraction For complex problems and large-scale programs, . suitable for processing smaller-scale programs language,

In order to solve the software crisis, in the 1980s, the computer industry proposed OOP (object oriented programming: object-oriented) idea to support object-oriented programming The programming language came into being.

In 1982, Dr. Bjarne Stroustrup introduced and expanded the object-oriented concept based on the C language and invented a new programming language.

In order to express the origin relationship between the language and the C language, it was named C++. Therefore: C++ is based on C language. It can not only perform procedural programming in C language, but also perform Object-based programming characterized by abstract data types, and also object-oriented programming.



2. Development History of C++

In 1979, when Benjani and others at Bell Labs tried to analyze the Unix kernel, they tried to Kernel modularity, so it was extended on the basis of C language and added a class mechanism, Completed a ready-to-run preprocessor called C with classes.

The development of language is like practicing martial arts, fighting monsters and upgrading. It is also a step-by-step process, from shallow to deep. Let’s first take a look at the historical versions of C++.

stage content
C with classes Classes and derived classes, public and private members, class construction and destruction, friends, inline functions, assignment operators, overloading, etc.
C++1.0 Add the concept of virtual functions, function and operator overloading, references, constants, etc.
C++2.0 Improved support for object-oriented, new protected members, multiple inheritance, object initialization, abstract classes, static members and const member functions
C++3.0 Further improvement, the introduction of templates to solve the ambiguity problems caused by multiple inheritance and the processing of corresponding construction and destruction
C++98 The first version of the C++ standard, supported by most compilers and recognized by the International Organization for Standardization (ISO) and the American Standards Institute,Rewrite the C++ standard library in template mode and introduce STL (Standard Template Library)
C++03 The second version of the C++ standard has no major changes in language features, mainly: fixing errors and reducing diversity.
C++05 The C++ Standards Committee issued a Count Report (Technical Report, TR1), officially changing its name to C++0x, which is planned to be released sometime in the first decade of this century.
C++11 Many features have been added to make C++ more like a new language, such as: regular expressions, range-based for loops, auto keywords, new containers, list initialization, standard thread library, etc.
C++14 Extensions to C++11 mainly focus on fixing loopholes and improvements in C++11, such as: generic lambda expressions, auto return value type derivation, binary literal constants, etc.
C++17 Some minor improvements have been made in C++11, and 19 new features have been added, such as: optional text information for static_assert(), Fold expressions for variable templates, initializers in if and switch statements, etc.
C++20 The largest release since C++11, introducing many new features, such as: **Modules, Coroutines, Ranges ), concepts (Constraints)** and other major features, as well as updates to existing features: such as Lambda supporting templates, scope for supporting initialization, etc.
C++23 formulating

C++ is still developing backwards. However: Nowthe mainstream company usesorC++98and a>, so everyone does not need to pursue the latest, focus on mastering C++98 and C++11, and after work, as you understand C++ Keep deepening, and when you have time, you can think about the updated features. C++11



3. The importance of C++

3.1 Widespread use of language

The data in the figure below comes from the latest rankings of the TIOBE programming language community in December 2021. In more than 30 years of development, C/C++ has almost consistently ranked in the top 5.
Insert image description here
Insert image description here

TIOBE Programming Language Community Ranking is an indicator of programming language popularity trends, updated monthly. This ranking is based on experienced programmers, courses and rankings on the Internet. The number of third-party manufacturers. Rankings are calculated using well-known search engines such as Google, MSN, Yahoo!, Wikipedia, YouTube, Baidu, etc.

[Note:The ranking cannot indicate which language is good or not. Each programming language has its own application scenarios.


3.2 In the field of work

  1. Operating system and large-scale system software development
    Almost all operating systems are written in C/C++,Many large-scale software are almost all written in C++, such as Photoshop, Office, JVM (Java Virtual Machine), etc. The reason is that it has high performance and can directly control the hardware.

  2. Server-side development
    Backend development: Mainly focuses on the processing of business logic, that is, responding to front-end requests and back-end responses. Java is now the mainstream, but involution is relatively Seriously, big companies may have C++ background development, mainly doing some basic components, middleware, cache, distributed storage, etc. Server-side development is more extensive than back-end development, including back-end development. Generally, those with higher real-time requirements, such as game servers, streaming media servers, network communications, etc., are all developed in C++.

  3. Game development
    Almost all games on the PC platform are written in C++, such as: World of Warcraft, Legend, CS, Kart Racing, etc. , quite a few game engines on the market are developed based on C++, such as: Cocos2d, Unreal 4, DirectX, etc. The amount of calculations in the field of three-dimensional games is very huge, and the underlying mathematics are all matrix transformations. If you want beautiful graphics, rich content, and real-time game performance, you can only choose the C++ language for these high-difficulty requirements. Relatively well-known manufacturers: Tencent, NetEase, Perfect World, Giant Network, etc.

  4. Embedded and Internet of Things fields
    Embedded: It is to embed a main control board with computing power inside a machine or electronic device to control these< a i=2> device. For example: smart bracelets, cameras, sweeping robots, smart speakers, etc. When it comes to embedded development, what everyone can think of most is microcontroller development (that is, carried out on 8-bit, 16-bit or 32-bit microcontroller products or bare metal Development), in addition to microcontroller development, embedded development also includes development on the SOC chip, system level, driver level, application and middleware level. Common positions include: embedded development engineer, driver development engineer, system development engineer, Linux development engineer, firmware development engineer, etc. Some well-known manufacturers, such as: mobile phone manufacturers represented by Huawei, vivo, oppo, and Xiaomi; chip manufacturers represented by Unisoc and Espressif Systems Factories; manufacturers with their own terminal business such as DJI, Hikvision, Dahua, and CVTE; as well as traditional home appliance industries such as Haier, Hisense, and Gree. With the popularization of 5G, the Internet of Things (i.e., the Internet of Everything) has also become an emerging force, such as: Alibaba lot, Tencent lot, Jingdong , Baidu, Meituan, etc. all have hardware-related business units.










  5. Digital image processing
    Digital image processing involves a large number of mathematical matrix operations, which requires relatively high CPU computing power. The main image processing algorithm libraries and open source libraries are Written in C/C++, such as: OpenCV, OpenGL, etc. The famous Photoshop is written in C++.

  6. Artificial Intelligence
    When it comes to artificial intelligence, the first thing that comes to mind is Python. It is believed that learning artificial intelligence requires learning Python. This is a misunderstanding. Python has a relatively rich library.. the core of deep learning algorithms behind artificial intelligence are still written in C++. ButFill in the parameters and import the data to start training the model, Use python to quickly build a neural network

  7. Distributed Applications
    In recent years, with the rise of the mobile Internet, the data volume of each application has continued to increase; the back-end architecture must continuously improve its performance and concurrency capabilities to cope with the advent of the big information era. . In the distributed field, many distributed frameworks, file systems, intermediate components, etc. are developed in C++.
    Several heavyweight components of the Hadoop ecosystem that have a great impact on distributed computing: HDFS, zookeeper, HBase, etc. are also based on GFS, Chubby, and BigTable implemented by Google in C++. Including the distributed computing framework MapReduce, Google first implemented it in C++, and then there was an open source Java version.

In addition to the above fields, in: Scientific computing, Browser, Streaming media development, Network software, etc. are all C++ A more suitable scenario,
As an evergreen tree of an old language, C++ has always occupied the top 5 programming languages, and it definitely has its value.


4. C++ learning path and book recommendations

  • The first level, basics of C++ (ordinary)
    Choose an introductory book, such as "C++ Primer", "C++ University Tutorial" 》Or the classic "C++ Programming Language" written by Stroustrup or his new work a year and a half ago
    ;, and the general C++ courses also stop here, in addition **"C++ Standard Library"** and "The C++ Standard Library" Extensions" is available for reference"C++ Programming Principles and Practice"

  • The second level, use C++ correctly and efficiently (with ease)
    You must self-study starting from this level, read **"(More) Effective C++》, 《(More)Exceptional C++》, Effective STL" and"C++ Programming Standards"**, etc., are suitable for embarking on the road of professional C++ development;

  • The third level, in-depth interpretation of C++ (superb)
    For global issues, you can read** "In-depth Exploration of the C++ Object Model", < /span> "C++ Template Metaprogramming"**;, "New Thinking in C++ Design" , Templates""C++ Books such astemplates and template metaprogramming, if you want to challenge your IQ, you can read about"STL Source Code Analysis", "Meditations on C++", "Imperfect C++"

  • The fourth level, study C++ (return to nature)
    Read** "The Design and Evolution of C++ Language", < a i=3> "The Essence of Programming"** (including the mathematical foundation behind STL design), C++ standard document "ISO/IEC 14882:2003" , Proposals and reports of the C++ Standards Committee, and academic literature on C++. Because
    I mainly use C++, which is probably only at the second or third level. However, C++ is only one part of software development. Language alone cannot solve business and engineering problems. It is recommended that readers do not insist on "thoroughly learning C++ knowledge within a few years. When they reach the second level, they can learn from actual work experience and wait until they are interested. Slowly continue to learn higher levels of knowledge. Although learning C++ is difficult, it is also quite interesting and satisfying.


It is recommended not to regard "proficient in C++" as a one-year goal. Language learning should be regarded as a continuous process. Language is used in specific applications.

Guess you like

Origin blog.csdn.net/NiNi_suanfa/article/details/134258997