What Is C++? History, Standards (C++11–23), Use Cases, and How to Start
이 글의 핵심
A high-level map of C++: history, standards, where it shines, trade-offs, myths, roadmap, and what to know before deeper series posts—environment → compiler → build → memory → concurrency.
Introduction
This is the “map” article: what C++ is, why teams use it, and what to know before diving in. The hands-on series covers environment → compiler → build → memory → concurrency → exceptions → templates → STL, plus coding interviews, interop, GUIs, and newer standards. Full series index: C++ series index.
Before syntax, it helps to see how topics connect and what you gain and trade off when choosing C++.
You will learn:
- Brief history and standardization
- Where C++ sits today (standards, tooling)
- Domains, strengths, weaknesses
- Real-world problem scenarios and how C++ addresses them
- A learning roadmap, career angles, and production habits
- Prerequisites before posts #1–#10
Reading order: New to C++ → start here (#0), then #1 Environment. Experienced in other languages → you may skip to #1.
Why C++? Real-world scenarios
1) Game servers: latency & memory pressure
Problem: Thousands of concurrent players; GC pauses hurt frame time.
C++ angle: Manual control + RAII for predictable latency. See #6 Memory.
2) HFT: microsecond sensitivity
Problem: App-layer jitter after network is already minimized.
C++ angle: Native code, explicit allocation control, kernel bypass / NUMA-aware designs.
3) Embedded: tiny RAM
Problem: 64 KB RAM; heavy runtimes don’t fit.
C++ angle: Stack/static usage, optional -fno-exceptions -fno-rtti. See #42 Embedded.
4) Big data / parallel CPU
Problem: Python GIL limits threads; custom kernels need C++.
C++ angle: std::thread, OpenMP, SIMD. See #7, #39 SIMD.
5) Engines & real-time graphics
Problem: 60+ FPS budgets.
C++ angle: GPU APIs, custom allocators, cache-friendly layouts. See #15 cache.
6) Database engines
Problem: Huge datasets, ms-level queries.
C++ angle: Layout control, alignment, custom allocators.
7) Browser engines
Problem: DOM/layout/render in milliseconds.
C++ angle: JIT integration, pools, multi-threaded pipelines.
8) High-throughput logging
Problem: Sync I/O blocks threads.
C++ angle: Lock-free buffers + background flush threads.
The sketch below shows the idea: producer threads enqueue messages under a mutex while a writer thread drains the queue to disk. You trade a little locking for not stalling every caller on disk latency.
// Conceptual async log buffer (queue, mutex, thread)
template<typename T>
class AsyncLogBuffer {
std::queue<T> buffer_;
std::mutex mtx_;
std::thread writer_;
void flush() { /* write buffer to disk */ }
public:
void log(T msg) {
std::lock_guard lock(mtx_);
buffer_.push(std::move(msg));
}
};
Scenario summary
| Scenario | Pain | Why C++ |
|---|---|---|
| Game server | GC pauses | Predictable latency, RAII |
| HFT | μs jitter | Native code, explicit memory |
| Embedded | RAM limits | Static sizing, small binaries |
| Big data | GIL, custom kernels | Threads, SIMD |
| Engine | Frame budget | APIs + cache-friendly design |
| DB engine | Fast paths | Memory layout control |
| Browser | Tight pipelines | Mature native stacks |
| Logging | I/O bound | Lock-free / async |
Table of contents
- History
- Standards & ecosystem
- Where C++ is used
- Pros & cons
- Language features by standard
- Common myths
- Learning roadmap
- Prerequisites
- First code
- Career paths
- Production tips
- FAQ
- Typical errors
- Checklist
flowchart LR A[#0 What is C++?] --> B[#1 Environment] B --> C[#2–4 Build] C --> D[#6 Memory] D --> E[#7 Concurrency] E --> F[#9 Templates] F --> G[#10 STL] G --> H[#11–49 Advanced]
1. History
- C (1970s): systems/portable language close to hardware.
- C with Classes → C++ (1980s, Bjarne Stroustrup): classes, inheritance, polymorphism—efficient high-level abstractions.
- C++98: first ISO C++ standard; STL containers/iterators/algorithms.
- C++03: bugfix release.
- C++11: “modern C++” baseline:
auto, lambdas, smart pointers,std::thread, move semantics. - C++14, C++17, C++20, C++23: incremental evolution (filesystem, optional/variant, concepts, ranges, coroutines, modules,
std::expected, …).
timeline
title C++ standardization
1979 : C with Classes
1983 : C++ name settled
1998 : C++98 (first ISO)
2011 : C++11 (modern baseline)
2017 : C++17 (common production target)
2020 : C++20 (concepts, ranges)
2023 : C++23
Practical baseline: C++11+ to read modern code; C++17 is a common greenfield default; adopt C++20 features when your toolchain supports them.
2. Standards & ecosystem
ISO defines the standard; GCC, Clang, MSVC implement it (feature levels vary by version).
Ecosystem: games, databases, browsers, OS/drivers, trading, embedded—anywhere performance and control matter. Rust competes in some niches, but huge C++ codebases and hiring pools keep C++ central.
3. Where C++ is used
| Domain | Examples |
|---|---|
| Games / graphics | Engines, rendering, simulation |
| Systems / OS | Kernels, drivers, virtualization |
| Finance | Low-latency trading, risk |
| Embedded / IoT | Automotive, aerospace, industrial |
| Media | Codecs, streaming pipelines |
| Databases | Engines, storage, caches |
Theme: tight control of latency, memory, and CPU.
Tiny code sketches
// Game-style cache-friendly update
std::vector<Entity> entities(10000);
for (auto& e : entities) e.update(deltaTime);
// Finance-style hot path
void onOrder(const Order& o) {
orderBook_.add(o);
}
4. Pros & cons
Pros: top-tier performance when used well; portability of standard C++; huge legacy and libraries; stable ISO standardization.
Cons: steep learning curve (memory, UB, templates, concurrency); build complexity; you must enforce safety (static analysis, sanitizers, discipline).
Choose C++ when performance / control are primary; consider Go/Rust/Python where velocity or safety models fit better.
5. Features by standard (summary)
| Feature | Notes |
|---|---|
| Static typing | Types checked at compile time |
| Compiled | Source → machine code |
| Multi-paradigm | Procedural, OOP, generic, functional bits |
| Memory | Manual + RAII + smart pointers |
| Library | STL containers/algorithms |
Standard cheat sheet
C++98: STL, basic OOP, exceptions
C++11: auto, lambdas, smart pointers, threads, move semantics
C++14: generic lambdas, make_unique
C++17: optional, variant, filesystem, structured bindings
C++20: concepts, ranges, coroutines, modules, format
C++23: expected, mdspan, …
flowchart TD
A[New project] --> B{Legacy constraints?}
B -->|Yes| C[C++11/14]
B -->|No| D{Need latest features?}
D -->|Yes| E[C++20]
D -->|No| F[C++17 typical default]
6. Myths
- “C++ is always faster than C.” Only if used well—virtual calls, exceptions, RTTI,
shared_ptratomics cost. - “Never use pointers.” Non-owning raw pointers are fine; owning raw
new/deleteis risky—prefer smart pointers. - “C++ is frozen old.” Standards ship every three years; adoption lags for toolchain/legacy reasons.
- “C++ is only OOP.” Data-oriented designs are common in performance code.
- “Rust replaces C++.” Coexistence is likely; migration costs are huge.
- “Learn C++ → instant job.” Domain depth (games, systems, HFT, embedded) matters.
std::endlis just newline. It also flushes—can be slow in tight loops; prefer'\n'.using namespace stdin headers. Pollutes global namespace—avoid in headers.
7. Roadmap (high level)
- Basics (1–2 months): #1 Environment, syntax, pointers/references → #6.
- Intermediate: smart pointers → #10 STL → #7 threads → #8 exceptions.
- Advanced: templates #9, move semantics #14, profiling #15.
- Domain: games, systems, networking, finance—pick a lane and build projects.
Books: A Tour of C++ (Stroustrup), Effective Modern C++ (Meyers).
8. Prerequisites
Helpful but not mandatory: prior programming experience, basic memory intuition, comfort reading English docs/errors, optional math for quant/graphics tracks.
9. First code
// g++ -std=c++17 -o hello hello.cpp && ./hello
#include <iostream>
int main() {
std::cout << "Hello, C++!\n";
return 0;
}
STL teaser
#include <iostream>
#include <vector>
#include <algorithm>
int main() {
std::vector<int> v = {3, 1, 4, 1, 5};
std::sort(v.begin(), v.end());
for (int x : v) std::cout << x << " ";
std::cout << "\n";
return 0;
}
10. Career (overview)
Domains: games (engines, networking), systems (OS, drivers), finance (low-latency), embedded (AUTOSAR, RTOS).
Junior → mid → senior: syntax/STL → concurrency/templates/design → architecture/mentoring.
See career roadmap and interview posts in the series.
11. Production habits
- Prefer modern C++ (
auto, smart pointers, containers). - CMake for builds (#4); vcpkg/Conan for deps.
- clang-tidy, cppcheck, Address/Thread/UB sanitizers, unit tests.
- Patterns: RAII, smart pointers, PIMPL, factories returning
unique_ptr, DI for tests.
12. FAQ (short)
- Hard to learn? Broad surface area—go stepwise.
- Jobs? Performance-critical industries still hire C++ specialists.
- Which standard? C++11 minimum; aim for C++17+.
- C vs C++? C++ adds abstractions, STL, exceptions, templates—C often compiles as C++.
- Python first? Helps with basics; C++ adds memory model and compilation.
- Web backends in C++? Possible (Crow/Drogon/etc.), but many teams pick other stacks unless latency is paramount.
13. Typical errors
- Undefined reference → link missing
.o/library. - Segfault → ASan + gdb/lldb.
std::not found → wrong standard flag or missing header.- Slow builds → reduce includes, PIMPL, modules (where viable).
- Double free / heap corruption → ASan + smart pointers.
14. Checklist
- Compiler installed (
g++,clang++, or MSVC) -
-std=c++17(or newer) in your build flags - Editor/IDE configured
- Hello World builds and runs
- Series index bookmarked: index
Related posts
- Variadic templates
- VS Code C++
auto&decltype- Modern C++ cheatsheet
Summary
C++ evolves on a steady ISO cadence and remains central where performance and control dominate. Learn the trade-offs, ignore myths, follow a structured roadmap, and pair language skills with tools (CMake, sanitizers, tests) for safer production code.
Next: #1 Development environment