C++

**C++** (**pronounced "c plus plus"**) is a computer programming language based on C. It was created for writing computer programs. In the 1990s, C++ became one of the most used programming languages in the world. Like C, C++ uses manual memory management (unlike most mainstream languages, where memory management is automatic), while the syntax usually used for it is similar, but different.

The C++ programming language was developed by Bjarne Stroustrup at Bell Labs in the 1980s, and was originally named "C with classes". The language was planned as an improvement on the C programming language, adding features based on object-oriented programming. Step by step, a lot of advanced features were added to the language, like exception handling, templates, "move semantics" and namespaces (not full module support, while that was added later) and new operator overloading capabilities were added in versions C++11 and C++20.

C++ runs on a most platforms (all mainstream ones), such as Windows and the various versions of UNIX, such as macOS, Linux, and BSD. Introduction to C++ language is a practical approach to describe the concepts of C++ for beginners to advanced software engineers.

C++ is a general-purpose programming language, which means that it can be used to create many kinds of applications.

C++20 is the latest version of the standard, which finally added for example module support in December 2020 (while many languages supported modules a decade, if not two or more, earlier). The major compilers have almost complete support for C++20, while almost all default to the older C++17 standard, so a compiler switch is needed to enable the C++20 support the compilers have.

New C++ standards are on a three-year schedule, so the next one, C++23, is expected in 2023, and some compilers already have some (partial) support for that experimental standard. The many earlier C++ standards have each added stuff to the language, almost never taken stuff out, so mostly keeping compatibility with older standards.

## Example

The following text is C++ source code, and it will write the words "Hello World!" on the screen when it has been compiled and is executed. This program is typically the first program a programmer would write while learning about programming languages.

This program is similar to the last, except it will add 3 + 2 and print the answer instead of "Hello World!".

This program subtracts, multiplies, divides and then prints the answer on the screen.

## Manual memory management

C++ introduced two keywords `new` and `delete` for manual memory management (while also keeping compatibility with the old way C uses), and the constructor and destructor concepts. In modern C++ code, using `new` and `delete` (and destructors) is no longer preferred in high-level code, rather containers such as `std:vector` (which at a low level are implemented with `new` and `delete`).

## Infobox (programming language)

- **name**: C++
- **logo**: File:ISO C++ Logo.svg
- **paradigm**: Multi-paradigm programming language, Multi-paradigm: procedural programming, procedural, functional programming, functional,  object-oriented programming, object-oriented, generic programming, generic
- **year**: 1983
- **designer**: Bjarne Stroustrup
- **developer**: Bjarne Stroustrup
Bell Labs

- **latest release version**: ISO/IEC 14882:2020
- **typing**: Static type, Static, Type system#Safely and unsafely typed systems, unsafe, Nominative type system, nominative
- **implementations**: C++ Builder, clang, Comeau C/C++, GNU Compiler Collection, GCC, Intel C++ Compiler, Microsoft Visual C++, Sun Studio (software), Sun Studio
- **dialects**: ISO/IEC 14882, ISO/IEC C++ 1998, ISO/IEC 14882, ISO/IEC C++ 2003, ISO/IEC 14882, ISO/IEC C++ 2011, ISO/IEC 14882, ISO/IEC C++ 2014, ISO/IEC 14882, ISO/IEC C++ 2017, ISO/IEC 14882, ISO/IEC C++ 2020
- **influenced by**: C (programming language), C, Simula, Ada (programming language), Ada 83, ALGOL 68, CLU (programming language), CLU, ML (programming language), ML
- **influenced**: Perl, LPC (programming language), LPC, Lua, Pike (programming language), Pike, Ada (programming language), Ada 95, Java (programming language), Java, PHP, D (programming language), D, C99, C Sharp (programming language), C#, Falcon (programming language), Falcon
- **operating system**: Cross-platform, Cross-platform (multi-platform)
- **file ext**: .h .hh .hpp .hxx  .cc .cpp .cxx
- **wikibooks**: C++ Programming
- **logo caption**: C++ logo used by ISO