Skip to content
Learn Netverks

Lesson

Step 2/36 6% through track

what-is-cpp

What is C++?

Last reviewed Jun 1, 2026 Content v20260601
Track mode
server_compiled
Means
Compiled runner
Reading
~2 min
Level
beginner

This lesson

This lesson teaches What is C++?: the syntax, patterns, and safety habits you need before advancing in C++.

Teams still ship What is C++? in C++ codebases—skipping it leaves gaps in debugging and code reviews.

You will apply What is C++? in contexts like: Game engines, trading systems, desktop apps, and performance-critical libraries.

Write C++ in main.cpp with int main(), click Run on server—the dev runner compiles with c++/g++ -std=c++17 -Wall and runs the binary; read template errors in stderr (LEARNING_RUNNER_ENABLED=true).

After the C track or equivalent—C++ builds on C memory ideas and adds OOP, templates, and the STL.

C++ is a multi-paradigm systems language created by Bjarne Stroustrup as "C with Classes." It remains one of the most widely used languages for performance-critical software.

Core characteristics

  • Compiled to native code — no VM; direct CPU execution like C
  • Zero-cost abstractions — templates and inline functions aim to compile away overhead
  • Rich standard library (STL) — containers, algorithms, strings, I/O streams
  • Backward compatible with C — most C code compiles as C++ with adjustments

Typical build-run flow (local)

  1. Write main.cpp with int main()
  2. g++ -std=c++17 -Wall -o main main.cpp
  3. ./main runs the native binary

Where C++ appears

Chromium, Unreal Engine, LLVM, MySQL, high-frequency trading stacks, and countless game and graphics engines rely on C++ for predictable latency and hardware access.

Important interview questions and answers

  1. Q: C vs C++ in one line?
    A: C is procedural with a minimal runtime; C++ adds OOP, templates, exceptions, and a much larger standard library on a C-compatible foundation.
  2. Q: Who still uses C++?
    A: Game engines, browsers, databases, finance, embedded systems with modern toolchains, and teams maintaining large native codebases.

Self-check

  1. What file extension do C++ source files typically use?
  2. Name one major project written in C++.

Tip: C++ source often uses .cpp or .cc; headers use .h or .hpp.

Interview prep

Is C++ garbage collected?

No by default—use stack objects, RAII, and smart pointers; the standard library does not provide a tracing GC.

Who still uses C++?

Chromium, Unreal Engine, game studios, databases, finance, and teams maintaining large performance-critical native systems.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs on the configured server runner (dev: npm run runner with LEARNING_RUNNER_ENABLED=true). Output appears below the editor.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • C++ vs Rust when?
  • Still used where?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump