Chapter 01

Getting Started

What C++ is, how source code becomes an executable, and the trade-offs of the language.

In this chapter

  1. What is C++?
  2. Making an Executable
  3. Advantages vs. Disadvantages
1

What is C++?

C++ is an intermediate-level programming language — an optimal mix of high-level abstraction and low-level control. It lets developers build complex applications while allowing fine-grained management of resource consumption and availability.


2

Making an Executable

  1. Write source code in .cpp files
  2. Compile those files into machine language "Object Files"
    • Extensions: .o or .obj
    • Object files ignore dependencies
  3. The Linker resolves all dependencies and produces the final executable

3

Advantages vs. Disadvantages

✓ Advantages
  • Portability
  • Object-oriented
  • Low-level memory manipulation
  • Manual memory management
  • Compatibility with C
✗ Disadvantages
  • No garbage collection
  • Unsafe features: friend, globals, pointers
  • No built-in thread support
  • Pointers (complexity & risk)
↑ Index Chapter 2 →