Influenced by: C simula algol ada ml
C++ is a multi-paradigm systems language that grafts classes, templates, and the STL onto C's machine-level model while keeping its zero-overhead philosophy: abstractions cost nothing you wouldn't have written by hand. Memory is manual and GC-free - new/delete and C's malloc/free are available - but idiomatic C++ ties every resource's lifetime to an object via RAII, so destructors run deterministically at scope exit and smart pointers (unique_ptr, shared_ptr) automate ownership without a garbage collector. The result is fine-grained, predictable control over memory and resources with optional safety nets.
What makes it distinctive
- RAII (Resource Acquisition Is Initialization) - a resource's lifetime is bound to an object's; the constructor acquires and the destructor releases, so memory, locks, files, and sockets are freed deterministically at scope exit with no garbage collector.
- Manual, GC-free memory with multiple tiers of control: C's
malloc/free, C++'snew/delete, placementnew, and custom allocators (e.g.std::allocator,std::pmrpolymorphic memory resources) let you direct exactly where and how memory is obtained. - Smart pointers (
std::unique_ptrfor unique ownership,std::shared_ptr/std::weak_ptrfor reference-counted sharing) encode ownership in the type system, automatingdeletewhile staying overhead-free for the unique case. - Zero-overhead abstraction - templates, inlining, and constexpr produce abstractions that compile to code as tight as hand-written C; you don't pay runtime cost for features you don't use.
- Move semantics (C++11 rvalue references) let large objects transfer ownership of their heap buffers instead of copying, eliminating allocations and deep copies.
- Templates and the STL provide compile-time generic programming with monomorphized, fully-inlined containers and algorithms - and metaprogramming powerful enough to compute at compile time.
History
C++ began in 1979 when Bjarne Stroustrup, a Danish computer scientist at AT&T Bell Laboratories in Murray Hill, New Jersey, started building "C with Classes" - a preprocessor (Cpre) that layered Simula-style classes onto C. Stroustrup wanted Simula's expressive class-based design for large programs combined with C's efficiency and direct hardware access, a combination no language of the era offered. By 1980 the tool supported real projects, and features like constructors/destructors, inheritance, and inline functions took shape.
In 1983 the language was renamed C++ - the name, coined by Rick Mascitti, uses C's ++ increment operator to signal "one more than C." A true compiler, Cfront, replaced the preprocessor (it translated C++ to C). The first commercial release came in 1985, accompanied by the first edition of Stroustrup's reference The C++ Programming Language. The 1989 C++ 2.0 release added multiple inheritance, abstract classes, and protected members; the early 1990s brought templates and exceptions, and Alexander Stepanov's Standard Template Library (STL) - generic containers and algorithms built on templates - was adopted into the language in 1994.
C++ was first standardized by ISO in 1998 as ISO/IEC 14882:1998 (C++98), with a bug-fix revision C++03 in 2003. After a long lull, C++11 (2011) was a landmark modernization, introducing auto, lambdas, move semantics and rvalue references, nullptr, range-based for, and the smart pointers std::unique_ptr/std::shared_ptr that made RAII-based ownership the default style. Subsequent triennial releases followed: C++14 (2014), C++17 (2017, adding std::optional, std::variant, structured bindings), C++20 (published December 2020, adding concepts, ranges, coroutines, and modules), and C++23, published by ISO in October 2024 as ISO/IEC 14882:2024. The language is governed by the ISO WG21 committee and shepherded publicly by the Standard C++ Foundation (isocpp.org).