How C++ Came to Be | C++ Programming

UPI Study › Courses › C++ Programming › Free lessons › Lesson 1.7 Free with a free account

How C++ Came to Be

C++ Programming · Chapter 1: Foundations of ProgrammingSection 1.7 · lesson 7 of 84video coming soon

← The Build-Run-Fix WorkflowNext lesson: What Separates C++ From C? →

Earn 3 college credits for C++ ProgrammingRecommended for credit by NCCRS · Computer Science 242 · self-paced · one payment, lifetime access

In this lesson

Origins, architecture and modern relevance.

  • Explain the problem that led to "C with Classes"
  • Trace the standards from C++98 to today
  • Describe compiled, statically typed and multi-paradigm
  • State the zero-overhead principle and where it holds

Transcript

Everything said in the video, section by section (1,663 words). Read along, or search it.

Opening Question

Why C++ Looks the Way It Does

Why does C++ look the way it does? Every design decision in the language answers a question someone actually faced, and it all grew out of one researcher's practical problem. We'll follow it from its origins through its standards, then look at the three properties, and the one principle, that explain most of what you'll experience learning it.

Origin Story

Stroustrup's Choice Between Structure and Speed

In the late 1970s, a Danish computer scientist named Bjarne Stroustrup was doing his doctorate at Cambridge, studying how software might be spread across several machines. To study it, he simulated it, and he wrote the simulation first in Simula, a language that grouped data with the operations that act on it. That made the program a pleasure to organize. But when he ran it, it was slow enough to be unusable. So he rewrote it in BCPL, a stripped-down systems language that ran fast, with direct control of the machine. It worked, and writing it was miserable. He came away convinced that the choice on offer, structure or speed, pick one, was false.

Building on C

C with Classes at Bell Labs

A language could offer Simula's organizing ideas, at the running cost of a systems language. In 1979, at Bell Laboratories, he began building it. He started from C, for practical reasons: it was fast, it ran on everything, and enormous amounts of working code already existed in it. Building on C meant his ideas could be adopted a little at a time, by people who couldn't afford to throw away what they had. The first version, C with Classes, added classes, derived classes, access control, and constructors and destructors. And none of it cost anything at runtime that the programmer hadn't asked for.

Naming

How C++ Got Its Name

By 1982, the design was rebuilt more ambitiously, gaining virtual functions, overloading, references and constants. In 1983, a colleague, Rick Mascitti, suggested the name C++, borrowing C's own increment operator: the successor to C, in C's own notation. The first commercial release followed in October 1985, alongside Stroustrup's book describing it.

Standardization

From Release 2.0 to C++98

A language owned by its author can change whenever the author decides. A language that banks, hospitals and aircraft depend on can't. Release 2.0 arrived in 1989, with multiple inheritance and abstract classes. In 1990, a formal standardization committee was convened, and the international body joined the following year. Its work is slow by design. A standard is a contract between everyone who writes C++ and everyone who builds tools for it. A mistake in it is expensive and permanent. The first international standard, C++98, was published in 1998. Its biggest addition was a library of ready-made containers and algorithms, where any algorithm works with any container. Then came a long silence. A modest correction appeared in 2003, and the next revision kept slipping, until the joke was that the x in its working name was a hexadecimal digit.

Revisions

C++11 and the Three-Year Timetable

It finally landed in 2011, and it was worth the wait. C++11 brought automatic type deduction, lambdas, move semantics, smart pointers and portable threads. It was the largest shift in the language's history: manual memory bookkeeping became avoidable, and code got much shorter. Fourteen was deliberately small. Seventeen standardized things every project used to hand-roll, like a type for a value that may be absent, and a filesystem library. Twenty brought concepts, ranges, coroutines and modules. Twenty-three consolidated. And twenty-six adds compile-time reflection, contracts, and a hardened standard library. Since 2011, the committee has worked to a fixed timetable: a revision every three years. Whatever isn't finished waits for the next one, which is why the long gap never recurred.

Modern C++

A Style, Not a Separate Language

You'll meet the phrase modern C++ constantly. It's not a separate language, and not a mode you switch on. It's a style that makes programs shorter, safer, and no slower. The shift is easiest to see as a change in who does the bookkeeping. Older code allocated memory and remembered to release it. Modern code ties every resource to an object that releases it automatically. Older code wrote index-counting loops. Modern code iterates by naming the collection, lets the compiler deduce types, and makes ownership visible in the type itself. Code written in 1995 still compiles today, which is a real strength. But a huge amount of material online predates 2011. When you find an example, check its age.

Property One

Compiled Ahead of Execution

Three properties explain most of what you'll experience: C++ is compiled, statically typed, and multi-paradigm. First, compiled. A program is translated in full, before it runs, into instructions for a specific kind of processor. No interpreter or virtual machine is needed. Java and C sharp compile to portable bytecode that a runtime executes. Python and JavaScript are read and executed by an interpreter as they run. Two consequences follow. A whole category of mistakes is caught before the program ever runs. And the executable is tied to one kind of machine, so each target needs its own build.

Property Two

Static Typing and Its Limits

Second, statically typed. Every name and expression has a type settled at compile time, and it doesn't change while the program runs. So the compiler catches a misspelled name, the wrong kind of value for an operation, the wrong number of arguments, and violations of a type's access rules. It does not catch a valid formula that's simply wrong, a correctly typed value that's the wrong one, reading beyond the end of your data, or using memory after releasing it. That second list is why C++ has its reputation. The compiler is a strict but narrow guardian: it verifies that your program is meaningful, never that it's correct. Newer revisions keep moving items from the second list to the first: smart pointers for ownership, bounds-checked views, and in twenty twenty-six, contracts and a hardened library.

Quick Check

Which Mistake Does the Compiler Stop

Quick check. Which one of these would the compiler stop? A call that passes one argument too many, a loop that runs one time too many, or memory that is never released? Pause, and decide. The extra argument. The other two are perfectly meaningful programs: one gives a wrong answer, and the other wastes memory. Both are still your job.

Property Three

Several Paradigms, None Enforced

Third, multi-paradigm. Most languages push you toward one way of structuring a solution. C++ deliberately supports several, and enforces none. Procedural style groups steps into named routines. It suits small tasks and numerical work. Object-oriented style builds a program from types that bundle data with the operations allowed on it. It suits simulations, and kinds of things that vary. Generic style writes an algorithm once, in terms of what it requires of its data. One sorting routine works for everything sortable. And compile-time, functional style computes what it can during the build, and passes operations around as values. Most real programs mix them. The freedom is real, and so is the responsibility.

Key Principle

The Two Halves of Zero Overhead

If you remember one idea from this lesson, make it this one: the zero-overhead principle. Stroustrup states it in two halves. First: what you don't use, you don't pay for. A feature you never touch mustn't slow down, enlarge, or complicate your program. That's why C++ has no background process reclaiming memory on its own schedule. A program that never needed it would still be paying for it. Second: what you do use, you couldn't reasonably hand-code any better. The convenient form compiles to essentially the instructions you'd have written yourself, minus the chance to get them wrong.

Caveat

Zero Overhead Is Not Zero Cost

But the principle doesn't promise zero cost, and it doesn't make programs automatically fast. A poorly chosen algorithm is just as slow in C++ as anywhere else. And a few features, notably choosing behavior based on an object's actual type at runtime, genuinely cost something. The principle guarantees you can decline them, not that they're free.

Trade-offs

Abstraction and Control Together

Here's the trade most languages make. Assembly gives total control of the machine, and almost no abstraction. C adds some. Java and C sharp, and then Python, trade away control for more abstraction. Most languages sit along that line. C++ deliberately pulls away from it, toward the corner with both: high abstraction, and high control. These positions are indicative, not measurements. The point is the direction.

Where It's Used

Fields Where Something Is Scarce

C++ isn't the most widely used language, and it's nobody's choice for a quick script. It's chosen where something specific is scarce, and losing control of it makes the system fail. In systems and infrastructure, everything above depends on it, so a percent of overhead is paid by every program on top. In games and graphics, time is scarce: a pause isn't a slow frame, it's a stutter. In finance and trading, it's predictability at microsecond scale. In embedded, automotive and aerospace work, it's memory, power and certainty, sometimes with dynamic allocation switched off entirely. And in scientific computing and machine learning, it's throughput over long runs. Cutting a routine's time by a third turns a seven-day run into under five days.

Worked Example

Frame Budgets and Worst-Case Time

Here's what fast really means for real-time work. At 60 frames per second, input, physics, logic and rendering must all finish inside 16.7 milliseconds, every frame. Headset displays running at 90 frames per second cut the budget to 11.1 milliseconds. Two programs can have the same average time. But if memory is reclaimed by a runtime at moments you didn't choose, some frames blow the budget. Released at points named in the source, the time stays predictable. So a trading system and a game engine are judged the same way: on their worst case, not their average.

Key Takeaways

Summary of the C++ Story and Principles

To summarize. C++ exists because one person refused to accept, that organizing a program well, and running it fast, were alternatives. It started from C for adoption's sake, was standardized in 1998, and has shipped a new revision every three years since 2011. It's compiled, statically typed and multi-paradigm, and each of those is a deliberate trade. The zero-overhead principle: unused features cost nothing, and used ones cost no more than hand-written code. And nobody uses all of the language: learning it means acquiring a coherent subset, deliberately.

Think About It

Trading Systems Versus Game Engines

Here's something to think about. A trading system and a game engine are very different programs. Why does the same argument favor C++ for both of them?

About C++ Programming at UPI Study

C++ Programming (Computer Science 242) is a self-paced online course of 84 video lessons in 11 chapters, from your first program to decisions, loops, arrays, functions, classes, files, pointers and inheritance. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Why take it here

Why students take C++ Programming with UPI Study

Your first real programming languageC++ teaches how programs really work: variables, control flow, functions, memory and objects. It is the base for data structures, algorithms, systems and game programming, and for most computer-science degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

C++ Programming carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About How C++ Came to Be

What problem led Bjarne Stroustrup to create C with Classes?
Stroustrup found that Simula organized his simulation well but ran too slowly to use, while BCPL ran fast but was miserable to write in. He decided that choosing between structure and speed was a false choice. In 1979 at Bell Labs he began adding classes, access control, constructors, and destructors to C, without runtime costs the programmer hadn't asked for.
What are the major C++ standards from C++98 to today?
C++98 was the first international standard, published in 1998, and its biggest addition was a library of containers and algorithms. A minor correction followed in 2003, and C++11 finally arrived in 2011 with lambdas, move semantics, and smart pointers. Since 2011, revisions have come every three years: C++14, 17, 20, 23, and 26, which adds reflection and contracts.
What does it mean that C++ is compiled, statically typed, and multi-paradigm?
Compiled means the whole program is translated into instructions for a specific processor before it runs. Statically typed means every name and expression has a type fixed at compile time, so the compiler catches misspelled names or the wrong number of arguments. Multi-paradigm means C++ supports procedural, object-oriented, generic, and functional styles without enforcing any of them. The compiler still cannot catch logic errors.
What is the zero-overhead principle in C++, and where does it not apply?
The zero-overhead principle says that what you don't use, you don't pay for, and what you do use, you couldn't reasonably hand-code any better. That is why C++ has no background process reclaiming memory. It doesn't mean zero cost, though. A poor algorithm is still slow, and choosing behavior by an object's runtime type does cost something, but you can decline it.

About the C++ Programming course

How many college credits is C++ Programming?
C++ Programming (Computer Science 242) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does C++ Programming cost and what is included?
$250, paid once, with lifetime access: all 84 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does C++ Programming take?
It is self-paced with no deadlines. The 84 lessons total about 0 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in C++ Programming.

84 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

C++ Programming
3 credits · NCCRS
Enroll →