Create your free BvLogic ID to continue this course and save your progress.
C++ for Beginners 5 lessons
  1. 1 What C++ adds and what it costs
  2. 2 Objects and resource management sign in to open
  3. 3 The standard library sign in to open
  4. 4 Templates and abstraction sign in to open
  5. 5 Building and getting better sign in to open
Course overview
Data: video · change

This lesson: 122KB

C++ for Beginners · Lesson 1 of 5

What C++ adds and what it costs

Know what you are taking on.

C++ began as C with classes and became something much larger. It gives you the same control over memory and hardware with abstractions that make large programs manageable.

Where it is used. Games and game engines, high performance financial systems, browsers, databases, embedded systems where more structure is wanted than C offers, and anything where speed genuinely matters. It is also the language of competitive programming and appears throughout computer science courses here.

What it adds over C. Classes and objects. Templates, which let one piece of code work for many types with no runtime cost. A large standard library of containers and algorithms. References, which are safer than raw pointers. Exceptions. And automatic resource management, which is the feature that most changes how the language feels.

What it costs. It is a genuinely large language, and it accumulated features over four decades without removing the old ones. There are several ways to do most things and some of them are historical. Compiler errors involving templates are famously long and difficult.

The practical approach. Learn modern C++, meaning C++11 and later, and ignore the older idioms until you meet them in existing code. Most tutorials teach a version of the language from twenty years ago, and following them produces code that works and looks obsolete to anyone who will hire you.

Set up with a modern compiler, all warnings on, and a recent standard selected explicitly.

Lab — try it yourself

Check which standard your compiler defaults to and set a modern one explicitly. Most default to something older than you expect.

Check what you learned

Create your free BvLogic ID to take the quiz and record your score.

Create your BvLogic ID
Continue to lesson 2 Up next 2. Objects and resource management