C++ Programming Practice (Fall 2023) - 10.01 - Templates @billbird2597
C++ Programming Practice (Fall 2023) - 10.01 - Templates  @billbird2597
Uploaded September 2023 | Updated November 2026, 3 hours ago
Note: There is a bug in the code for the templated findMax function (at the end of this video): In the for-each loop, the type of the iteration variable should be auto, not int. If I had tested the code better in the video, this bug would have been obvious and easily fixed...

The best way to learn programming is by programming. For new programmers, even finding enough practice problems can be a challenge. But now, thanks to generative AI, it's easy for anyone to request customized practice exercises on the fly.

Contents:
0:00 Introduction
4:06 Exercise 1 (Six templated functions)
29:25 Exercise 2 Preamble
31:32 Exercise 2 (Two more templated functions)
38:29 Exercise 3 Preamble
40:10 Exercise 3 (Templatizing)

This video series was originally made for the Fall 2023 offering of CSC 116, a second programming course teaching the C++ language (to students who already know C). The point of these videos is to demonstrate how helpful (or sometimes not helpful) generative AI tools can be when learning programming, and to provide some extra practice for programming students.

These videos were recorded in one sitting with no editing or script, so they also document the raw process of writing code, including all of the design decisions, fumbling, compromises, dead ends, compile errors, bugs and frustrating debugging sessions.

If you find any of this helpful or interesting, please let me know (I really appreciate any other feedback as well).
C++ Programming Practice (Fall 2023) - 10.01 - TemplatesAlgorithm Science (Summer 2025) - 24 - Graph RepresentationsC Programming Practice (Fall 2023) - 3.03 - Functions III (Prime Numbers)C++ Programming (Spring 2022) - Lecture 10.06 - Shallow Copies and Deep CopiesAlgorithm Science (Summer 2025) - 13 - TreesC++ Programming (Spring 2022) - Lecture 7.09 - Constructor DelegationC++ Programming (Spring 2022) - Lecture 10.03 - Writing a Vector (Part 1)C++ Programming (Spring 2022) - Lecture 6.10 - Tracing with Objects (Example 2)C Programming Practice (Fall 2023) - 4.00 - Character Input (Preface)Data Compression (Summer 2023) - Lecture 3 - LZWAlgorithm Science (Summer 2025) - 18 - 2-3 TreesC++ Programming (Spring 2022) - Lecture 8.07 - Derived Class Construction
BillBird |

C++ Programming Practice (Fall 2023) - 10.01 - Templates

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER