Channel logo

Introduction to C++: Programming Concepts and Applications

Season 1
This course is a step-by-step guide to the popular computer programming language C++. Professor John Keyser explains how to access C++ so you can program along with him as he covers the major coding styles offered by this versatile language, including object-oriented programming.
202325 episodesTV-PG
Free trial of The Great Courses Living or buy

Prime membership required

Terms apply

Episodes

  1. S1 E1 - Compiling Your First C++ Program
    October 31, 2023
    31min
    TV-PG
    Uncover the power and appeal of C++ for a wide range of uses. Then learn that by processing only 0’s and 1’s, a computer obeys the varied commands of a complex language such as C++. Write a traditional, “Hello, World!” program and discover the importance of adding comments to your code.
    Free trial of The Great Courses Living or buy
  2. S1 E2 - C++ QUICK START: With Browser or Download
    October 31, 2023
    34min
    TV-PG
    C++ QUICK START: With Browser or Download
    Free trial of The Great Courses Living or buy
  3. S1 E3 - Variables, Computations, and Input in C++
    October 31, 2023
    30min
    TV-PG
    Try out a program that calculates calories in different foods, demonstrating the essential elements of a program: input, variables, computations, and output. Learn to specify a variable’s type and value, and get advice on shortcuts for keeping your instructions clean. Also discover the origin of the name C++, which signals that the language is designed to do whatever C can do—and then some.
    Free trial of The Great Courses Living or buy
  4. S1 E4 - Booleans and Conditionals in C++
    October 31, 2023
    29min
    TV-PG
    Probe the power of conditionals, which let you construct programs that can choose between true and false alternatives. Learn to use the keyword bool, which stands for Boolean variable—a value that can be either true (1) or false (0). Study the three basic Boolean operations—and, or, not—and see how they can be combined to make truly complex logical operations.
    Free trial of The Great Courses Living or buy
  5. S1 E5 - Program Design and Writing Test Cases in C++
    October 31, 2023
    31min
    TV-PG
    There’s more to making a program than writing code. Begin by focusing on the importance of the header and special commands. Then consider how to use comments as “pseudocode” to design the structure that a particular program should follow. Finally, explore the crucial strategy of testing as you go, rather than when the program is complete and errors made near the start are harder to track down.
    Free trial of The Great Courses Living or buy
  6. S1 E6 - C++ Loops and Iteration
    October 31, 2023
    30min
    TV-PG
    Harness the power of loops, which are sections of code that repeat until a specified computation is complete. Focus on two main types of loops: while loops and for loops, with the latter being a compact way to make the loop occur a set number of times. Learn how to prevent infinite loops, and see how scope allows you to have separate variables inside and outside loops.
    Free trial of The Great Courses Living or buy
  7. S1 E7 - Importing C++ Functions and Libraries
    October 31, 2023
    33min
    TV-PG
    The secret for building an enormous program such as Windows, with millions of lines of code, is that it draws on ready-made code libraries. Investigate the options that libraries offer, from choosing random numbers to performing complex mathematical operations. Learn how to access a code library, and get tips for finding additional resources beyond the C++ standard libraries.
    Free trial of The Great Courses Living or buy
  8. S1 E8 - Arrays for Quick and Easy Data Storage
    October 31, 2023
    32min
    TV-PG
    In the first of two lectures on storing large amounts of data, learn the utility of arrays. An array is a collection of variables of the same type. Find out how to declare an array of variables and how to provide an index, which permits access to a specific value within the array. Probe the “out-of-bounds” error that can arise with arrays and see how it led to a notorious security breach.
    Free trial of The Great Courses Living or buy
  9. S1 E9 - Vectors for Safe and Flexible Data Storage
    October 31, 2023
    33min
    TV-PG
    Continue your study of data storage strategies by looking at vectors, which handle variables in much the same way as arrays but with distinct advantages, including the ability to change the size of a data structure dynamically. Learn how and when to use vectors, and discover that vectors offer a convenient fix for the out-of-bounds error introduced in the previous lecture.
    Free trial of The Great Courses Living or buy
  10. S1 E10 - C++ Strings for Manipulating Text
    October 31, 2023
    32min
    TV-PG
    Go beyond numbers to see how letters and punctuation are used in data strings, which are ordered sequences of characters. Examine string literals, which are specific fixed sequences of text; and string variables, which are the main way to process and control text data, such as names and addresses. Learn how to search, alphabetize, and concatenate string variables in C++.
    Free trial of The Great Courses Living or buy
  11. S1 E11 - Files and Stream Operators in C++
    October 31, 2023
    29min
    TV-PG
    Data files are collections of information that are accessed and manipulated through a program. See how data streaming techniques you've already used apply to reading and writing files with the library fstream. Discover that you've already been using an entity that will become increasingly important in the course: objects, which are entities combining variables and functions.
    Free trial of The Great Courses Living or buy
  12. S1 E12 - Top-Down Design and Using a C++ Debugger
    October 31, 2023
    30min
    TV-PG
    Get to know the vital task of debugging—finding and fixing errors in code. First, consider the advantages of top-down design, where a complex task is divided into manageable sub-tasks, as opposed to the bottom-up approach that lets complexity emerge more organically, if less predictably. See how incremental development helps in debugging through tools like the breakpoint and step-over commands.
    Free trial of The Great Courses Living or buy
  13. S1 E13 - Creating Your Own Functions in C++
    October 31, 2023
    30min
    TV-PG
    Functions serve as ready-made, self-contained units of code that perform a particular task, such as solving an equation, enumerating a list, or even something as simple as closing a file. Prepare for the intensive use of functions in the rest of the course by learning the basic commands that allow you to create your own functions. Get your feet wet with several examples.
    Free trial of The Great Courses Living or buy
  14. S1 E14 - Expanding What Your Functions Can Do in C++
    October 31, 2023
    31min
    TV-PG
    A parameter is a piece of data used as input into a function. Discover how to create two functions, each with the same name, but with different numbers of parameters—an approach called overloading. Also look at different ways to “pass” parameters to produce an output, either preserving the parameter’s value (pass by value) or changing it (pass by reference).
    Free trial of The Great Courses Living or buy
  15. S1 E15 - Systematic Debugging, Writing Exceptions
    October 31, 2023
    30min
    TV-PG
    Dig deeper into debugging, learning to employ a tool called exception handling. An exception is a special note that something has gone wrong in a program. Know how to follow up these crucial clues. Also zero in on the six major steps of debugging: isolate the error, narrow down the failure point, identify the problem, fix the problem, re-test, and look for similar cases.
    Free trial of The Great Courses Living or buy
  16. S1 E16 - Functions in Top-Down and Bottom-Up Design
    October 31, 2023
    34min
    TV-PG
    Revisit top-down versus bottom-up approaches to coding, this time using functions as the building blocks of your program. First, create a game with the top-down strategy, identifying the individual functions that you need in a flowchart. Then design a tool for word processing by using the bottom-up tactic, in which you take available functions and create something completely new.
    Free trial of The Great Courses Living or buy
  17. S1 E17 - Objects and Classes: Encapsulation in C++
    October 31, 2023
    33min
    TV-PG
    So far, you’ve focused on procedurally oriented programming, which characterizes the original C computer language that led to C++. Now turn to one of the major strengths and innovations of C++: object-oriented programming. Learn that objects are variables and functions encapsulated within classes. Investigate the great utility of this technique for organizing and manipulating data.
    Free trial of The Great Courses Living or buy
  18. S1 E18 - Object-Oriented Constructors and Operators
    October 31, 2023
    32min
    TV-PG
    The ability to design appropriate classes may be the single most important skill in object-oriented programming. Survey two key tools for using classes effectively. First, constructors let you create classes that fit the requirements of the objects within them. Second, operator overloading allows you to tailor operators to a specific function, providing a handy shortcut that streamlines coding.
    Free trial of The Great Courses Living or buy
  19. S1 E19 - Dynamic Memory Allocation and Pointers
    October 31, 2023
    33min
    TV-PG
    C++ provides different ways to control data storage in memory. Investigate dynamic memory allocation, which allows memory to grow and shrink with the demands of a program as it is running—as opposed to static memory, which is fixed at runtime. Practice managing memory in a 20-questions-type game and compare the advantages of allocating dynamic memory with pointers versus vectors.
    Free trial of The Great Courses Living or buy
  20. S1 E20 - Object-Oriented Programming with Inheritance
    October 31, 2023
    33min
    TV-PG
    Explore the power of inheritance, which is a technique for creating classes that inherit properties from another class, called the base class. Using this tool, you can define a variable or function just once and then use it in multiple classes. Walk through several examples of inheritance, seeing how it greatly reduces complexity by eliminating redundant code.
    Free trial of The Great Courses Living or buy
  21. S1 E21 - Object-Oriented Programming with Polymorphism
    October 31, 2023
    31min
    TV-PG
    Study a key object-oriented feature called polymorphism, which means “many shapes” and refers to the ability of a class to be used in multiple ways. Start with a superclass that is specialized into multiple subclasses, each of which has a different implementation. Learn to define virtual functions for the superclass, leading to diverse properties in the subclasses.
    Free trial of The Great Courses Living or buy
  22. S1 E22 - Using Classes to Build a Game Engine in C++
    October 31, 2023
    32min
    TV-PG
    Use your knowledge of object-oriented programming to design a “game engine” that can be used for building multiple games. Take a top-down approach, drawing on encapsulation, hierarchical inheritance, and polymorphism to create the two-person game Othello, also known as Reversi. Discover the ease with which you can create other subclasses for additional games, such as checkers and chess.
    Free trial of The Great Courses Living or buy
  23. S1 E23 - C++ Templates, Containers, and the STL
    October 31, 2023
    31min
    TV-PG
    Whenever you have an idea that’s so general that it’s not tied down by any specific data type, you’ll want to turn to generic programming, which substitutes a template for a data type. The Standard Template Library (STL) is a menu of generic container structures that address these types of problems. Learn the advantages of various containers, including queues, lists, stacks, and vectors.
    Free trial of The Great Courses Living or buy
  24. S1 E24 - C++ Associative Containers and Algorithms
    October 31, 2023
    34min
    TV-PG
    Probe deeper into generic programming and the STL, focusing on associative containers and algorithms. The former is a set of templates that lets you group different elements into ordered sets, while algorithms are rules that handle data or accomplish some other task, allowing advanced operations to be performed very quickly. Learn that algorithms are a powerful tool in programming.
    Free trial of The Great Courses Living or buy
  25. S1 E25 - Artificial Intelligence Algorithm for a Game
    October 31, 2023
    34min
    TV-PG
    Finish the course by drawing on all you have learned to design a game-playing algorithm for artificial intelligence—that is, a program that makes “intelligent” game moves as if it were human. Finally, look ahead to your options for continuing study in computer programming. With elementary C++ under your belt, there are many directions you can go in mastering this valuable skill.
    Free trial of The Great Courses Living or buy

Details

More info

Subtitles
None available
Producers
The Great Courses
Cast
John Keyser
Studio
The Great Courses
By clicking play, you agree to our Terms of Use.