C++
C++ is a high-level, general-purpose programming language created by Danish computer scientist Bjarne Stroustrup. First released in 1985 as an extension of the C programming language, adding object-oriented features, it has since expanded significantly over time adding more OOP and other features; /C++98 standardization, C++ has added functional features, in addition to facilities for low-level memory manipulation for systems like microcomputers or to make operating systems like Linux or Windows, and even later came features like generic programming. C++ is usually implemented as a compiled language, and many vendors provide C++ compilers, including the Free Software Foundation, LLVM, Microsoft, Intel, Embarcadero, Oracle, and IBM.
C++ was designed with systems programming and embedded, resource-constrained software and large systems in mind, with performance, efficiency, and flexibility of use as its design highlights. C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications, including desktop applications, video games, servers, and performance-critical applications.
C++ is standardized by the International Organization for Standardization, with the latest standard version ratified and published by ISO in October 2024 as ISO/IEC 14882:2024. The C++ programming language was initially standardized in 1998 as ISO/IEC 14882:1998, which was then amended by the C++03, C++11, C++14, C++17, and C++20 standards. The current standard supersedes these with new features and an enlarged standard library. Before the initial standardization in 1998, C++ was developed by Stroustrup at Bell Labs since 1979 as an extension of the C language; he wanted an efficient and flexible language similar to C that also provided high-level features for program organization. Since 2012, C++ has been on a three-year release schedule with C++26 as the next planned standard.
History
In 1979, Bjarne Stroustrup, a Danish computer scientist, began work on "", the predecessor to C++. The motivation for creating a new language originated from Stroustrup's experience in programming for his PhD thesis. Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development. When Stroustrup started working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with respect to distributed computing. Remembering his PhD experience, Stroustrup set out to enhance the C language with Simula-like features. C was chosen because it was general-purpose, fast, portable, and widely used. In addition to C and Simula's influences, other languages influenced this new language, including ALGOL 68, Ada, CLU, and ML.Initially, Stroustrup's "C with Classes" added features to the C compiler, Cpre, including classes, derived classes, strong typing, inlining, and default arguments.
In 1982, Stroustrup started to develop a successor to C with Classes, which he named "C++" after going through several other names. New features were added, including virtual functions, function and operator overloading, references, constants, type-safe free-store memory allocation, improved type checking, and BCPL-style single-line comments with two forward slashes. Furthermore, Stroustrup developed a new, standalone compiler for C++, Cfront.
In 1984, Stroustrup implemented the first stream input/output library. The idea of providing an output operator rather than a named output function was suggested by Doug McIlroy.
In 1985, the first edition of The C++ Programming Language was released, which became the definitive reference for the language, as there was not yet an official standard. The first commercial implementation of C++ was released in October of the same year.
In 1989, C++ 2.0 was released, followed by the updated second edition of The C++ Programming Language in 1991. New features in 2.0 included multiple inheritance, abstract classes, static member functions, const member functions, and protected members. In 1990, The Annotated C++ Reference Manual was published. This work became the basis for the future standard. Later feature additions included templates, exceptions, namespaces, new casts, and a Boolean type.
In 1998, C++98 was released, standardizing the language, and a minor update was released in 2003.
After C++98, C++ evolved relatively slowly until, in 2011, the C++11 standard was released, adding numerous new features, enlarging the standard library further, and providing more facilities to C++ programmers. After a minor update released in December 2014, various new additions were introduced in C++17. After becoming finalized in February 2020, a draft of the C++20 standard was approved on 4 September 2020, and officially published on 15 December 2020.
On January 3, 2018, Stroustrup was announced as the 2018 winner of the Charles Stark Draper Prize for Engineering, "for conceptualizing and developing the C++ programming language".
In December 2022, C++ ranked third on the TIOBE index, surpassing Java for the first time in the history of the index., the language ranks second after Python, with Java being in third.
In March 2025, Stroustrup issued a call for the language community to defend it. Since the language allows manual memory management, bugs that represent security risks such as buffer overflow may be introduced in programs when inadvertently misused by the programmer.
Etymology
According to Stroustrup, "the name signifies the evolutionary nature of the changes from C." This name is credited to Rick Mascitti and was first used in December 1983. When Mascitti was questioned informally in 1992 about the naming, he indicated that it was given in a tongue-in-cheek spirit. The name comes from C'sDuring C++'s development period, the language had been referred to as "new C" and "C with Classes" before acquiring its final name.
Philosophy
Throughout C++'s life, its development and evolution has been guided by a set of principles:- It must be driven by actual problems and its features should be immediately useful in real world programs.
- Every feature should be implementable.
- Programmers should be free to pick their own programming style, and that style should be fully supported by C++.
- Allowing a useful feature is more important than preventing every possible misuse of C++.
- It should provide facilities for organizing programs into separate, well-defined parts, and provide facilities for combining separately developed parts.
- No implicit violations of the type system.
- User-created types need to have the same support and performance as built-in types.
- Unused features should not negatively impact created executables.
- There should be no language beneath C++.
- C++ should work alongside other existing programming languages, rather than fostering its own separate and incompatible programming environment.
- If the programmer's intent is unknown, allow the programmer to specify it by providing manual control.
Standardization
| Year | ISO/IEC Standard | Informal name |
| 1998 | 14882:1998 | C++98 |
| 2003 | 14882:2003 | C++03 |
| 2011 | 14882:2011 | C++11, C++0x |
| 2014 | 14882:2014 | C++14, C++1y |
| 2017 | 14882:2017 | C++17, C++1z |
| 2020 | 14882:2020 | C++20, C++2a |
| 2024 | 14882:2024 | C++23, C++2b |
| scope="row" | C++26, C++2c |
C++ is standardized by an ISO working group known as JTC1/SC22/WG21. The working group holds three week-long meetings each year. So far, it has published seven revisions of the C++ standard and is currently working on the next revision, C++26.
In 1998, the ISO working group standardized C++ for the first time as ISO/IEC 14882:1998, which is informally known as C++98. In 2003, it published a new version of the C++ standard called ISO/IEC 14882:2003, which fixed problems identified in C++98.
The next major revision of the standard was informally referred to as "C++0x", but it was not released until 2011. C++11 included many additions to both the core language and the standard library.
In 2014, C++14 was released as a small extension to C++11, featuring mainly bug fixes and small improvements. The Draft International Standard ballot procedures completed in mid-August 2014.
After C++14, a major revision C++17, informally known as C++1z, was completed by the ISO C++ committee in mid July 2017 and was approved and published in December 2017.
As part of the standardization process, ISO also publishes technical reports and specifications:
- ISO/IEC TR 18015:2006 on the use of C++ in embedded systems and on performance implications of C++ language and library features,
- ISO/IEC TR 19768:2007 on library extensions mostly integrated into C++11,
- ISO/IEC TR 29124:2010 on special mathematical functions, integrated into,
- ISO/IEC TR 24733:2011 on decimal floating-point arithmetic,
- ISO/IEC TS 18822:2015 on the standard filesystem library, integrated into C++17,
- ISO/IEC TS 19570:2015 on parallel versions of the standard library algorithms, integrated into C++17,
- ISO/IEC TS 19841:2015 on software transactional memory,
- ISO/IEC TS 19568:2015 on a new set of library extensions, some of which are already integrated into C++17,
- ISO/IEC TS 19217:2015 on the C++ concepts, integrated into C++20,
- ISO/IEC TS 19571:2016 on the library extensions for concurrency, some of which are already integrated into C++20,
- ISO/IEC TS 19568:2017 on a new set of general-purpose library extensions,
- ISO/IEC TS 21425:2017 on the library extensions for ranges, integrated into C++20,
- ISO/IEC TS 22277:2017 on coroutines, integrated into C++20,
- ISO/IEC TS 19216:2018 on the networking library,
- ISO/IEC TS 21544:2018 on modules, integrated into C++20,
- ISO/IEC TS 19570:2018 on a new set of library extensions for parallelism
- ISO/IEC TS 23619:2021 on new extensions for reflective programming,
- ISO/IEC TS 9922:2024 on new set of concurrency extensions, and
- ISO/IEC TS 19568:2024 on another new set of library extensions.