Overview

C++ (pronounced "see plus plus") is a general-purpose programming language that extends the design and syntax of the C language with higher-level abstractions. It emphasizes both performance and expressiveness, supporting a range of programming styles from low-level systems code to high-level generic or object-oriented designs. C++ implementations are available on major operating systems including macOS and Linux, and it remains widely used in software that requires close control over hardware and resources.

Key characteristics and language features

C++ combines features that allow direct manipulation of memory with language-level mechanisms for abstraction and safety. Core characteristics include strong static typing, manual and deterministic resource control, and a rich compile-time system that supports generic programming. Programmers commonly rely on idioms such as RAII (resource acquisition is initialization) to manage resources safely while keeping predictable performance.

  • Object-oriented features: classes, inheritance, polymorphism and encapsulation, which build on principles of object-oriented programming.
  • Generic programming: templates that enable type-agnostic algorithms and containers, with powerful compile-time metaprogramming capabilities.
  • Memory and performance control: explicit allocation, pointers, references and low-level constructs for fine-grained optimization.
  • Error handling: exception mechanisms and deterministic cleanup patterns; see also exception handling.
  • Modern additions: move semantics for efficient transfers, concurrency libraries, and modules standardized in recent revisions.

History and standardization

C++ originated as an extension called "C with classes" developed by Bjarne Stroustrup while working at Bell Labs. Its evolution has been guided by an international committee that produces formal standards. Over time the language has added features such as templates, namespaces, stronger type safety measures, and modern facilities for concurrency and modularity. Major standardized revisions have extended the language while keeping a strong emphasis on backward compatibility with existing code.

Typical uses and examples

C++ is commonly chosen for applications where predictable performance, low-level access to memory, or tight integration with hardware are important. Typical domains include:

  • Systems software: kernels, device drivers, and low-level libraries.
  • Game engines and real-time graphics, where performance and resource control matter.
  • High-performance computing and numerical simulations that demand efficient use of CPUs and memory.
  • Infrastructure and desktop applications where a balance of efficiency and abstraction is required.

Because of the language's flexibility, C++ code ranges from small embedded programs to large-scale applications and libraries. Modern C++ encourages the use of standard library facilities and higher-level abstractions to reduce boilerplate and increase safety while retaining the ability to hand-optimize critical code paths.

Implementations, portability and ecosystem

There are multiple mainstream compilers and toolchains for C++. Popular open-source compilers and toolchains provide extensive platform support, and major commercial toolchains are widely used on desktop and server platforms. Portability is generally strong: properly written C++ programs can be compiled for many architectures and operating systems, although system-level code can require platform-specific considerations.

Notable distinctions and practical considerations

C++ is distinct for its combination of high-level abstractions and low-level control. This mix brings both power and complexity: the language offers many features but has a steeper learning curve than some more specialized or higher-level languages. Common practical topics for developers include understanding lifetime and ownership rules, avoiding undefined behavior, and using modern language features responsibly to write clearer and safer code. For authoritative references and further learning, consult a language language reference and up-to-date compiler documentation.

Because C++ has been standardized and extended over decades, readers will encounter multiple dialects and standards in the wild. Newer revisions continue to add capabilities and address developer needs, while preserving compatibility with a vast body of existing software.

For more historical background and technical details, explore materials from the language's designers and standard documents that describe its design goals, feature set, and ongoing development processes.