C++ is a compiled, multi-paradigm programming language that began as "C with Classes" in the 1980s, created by Bjarne Stroustrup. It adds object-oriented features, templates, exceptions and a standard library to C while keeping low-level control over memory.
Why it matters
C++ powers game engines, browsers, databases, trading systems and much performance-sensitive desktop software. It lets developers write high-level abstractions that compile down to fast machine code, and it supports deterministic cleanup through RAII (resources are released when an object goes out of scope). The language is large and complex, and manual memory handling still allows serious bugs, so modern style favors smart pointers and standard containers over raw new and delete.
Example
#include <iostream>
#include <vector>
#include <memory>
int main() {
std::vector<int> v{1, 2, 3};
auto p = std::make_unique<int>(10);
std::cout << v.size() + *p << "\n";
}
The vector and the unique_ptr free their memory automatically. The program prints 13.
Common mistakes
- Treating C++ as "C plus classes" and using raw pointers and manual
deleteeverywhere. - Returning a reference to a local variable that no longer exists.
- Ignoring undefined behavior such as signed integer overflow.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.