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? →
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.
Enroll now → Course details Download the syllabus Every course with PRO →
Why take it here
Why students take C++ Programming with UPI Study
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.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →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?
What are the major C++ standards from C++98 to today?
What does it mean that C++ is compiled, statically typed, and multi-paradigm?
What is the zero-overhead principle in C++, and where does it not apply?
About the C++ Programming course
How many college credits is C++ Programming?
How much does C++ Programming cost and what is included?
Which universities accept UPI Study credits?
How long does C++ Programming take?
How are the exams done?
How do my credits reach my college?
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.
3 credits · NCCRSEnroll →