C++ CPE study materials
C++ CPE study resources

C++ CPE study plan

C++ CPE · Give each week a clear focus.

8 weeks · About 6 hours per week

Week 1

C++ Essentials 1 (CP101 / CPPE1) aligned objectives

  • Set up a compiler toolchain (g++ or clang++) and compile, run, and debug a multi-file program from the command line without an IDE

  • Write and explain programs that declare, initialize, and convert between fundamental types, and predict integer overflow and truncation results before running them

  • Use std::cin and std::cout to read and format typed input, including detecting and recovering from failed extraction

  • Trace the flow of if/else, switch, and loop constructs by hand for given inputs, then verify with the debugger

Your checkpoint

A folder of 10 small programs with a one-line comment per program predicting its output, plus a debugger transcript showing you stepped through at least one loop and one failed cin extraction

Week 2

C++ Essentials 1 (CP101 / CPPE1) aligned objectives

  • Write functions with default arguments, overloading, and pass-by-reference versus pass-by-value, and justify each choice in a comment

  • Implement recursive functions and identify base cases and stack depth for each

  • Use arrays and std::string to process input, including bounds-safe iteration

  • Organize declarations into headers with include guards and compile a two-file program

Your checkpoint

A single console utility split across two .cpp files and one .h file that uses at least three overloaded functions, one recursive function, and string processing, compiling cleanly with -Wall -Wextra

Week 3

C++ Essentials 1 (CP101 / CPPE1) aligned objectives

  • Define structs and classes with constructors, member initializer lists, and const member functions

  • Apply encapsulation by making data private and exposing behavior through public methods

  • Implement operator overloading for comparison and stream output on your own type

  • Explain the difference between a class and a struct in C++ and when each is idiomatic

Your checkpoint

A value-type class (for example a rational number or a 2D vector) with constructors, const-correct accessors, operator==, operator<, and operator<<, plus a short written rationale for each design decision

Week 4

C++ Essentials 1 (CP101 / CPPE1) aligned objectives

  • Use pointers and references correctly, including pointer arithmetic over arrays and null checks

  • Manage heap memory with new and delete, and identify leaks and double deletes in deliberately broken code

  • Convert between C-style arrays, pointers, and std::vector for the same algorithm

  • Read and explain compiler warnings and sanitizer output for memory errors

Your checkpoint

A one-page memory-error log: five broken snippets you wrote, the exact compiler or sanitizer message each produced, and the corrected version

Week 5

C++ Essentials 2 (CPP102 / CPPE2) aligned objectives

  • Implement and reason about dynamic allocation inside a class, including destructors and copy operations

  • Apply the rule of three and explain why copy construction and copy assignment must both be handled

  • Use std::vector and std::map to replace hand-written dynamic arrays and lookup loops

  • Write iterator-based loops and explain iterator invalidation for at least vector and map

Your checkpoint

A resource-owning class with correct destructor, copy constructor, and copy assignment, tested by a driver that copies, assigns, and destroys objects while a sanitizer runs clean

Week 6

C++ Essentials 2 (CPP102 / CPPE2) aligned objectives

  • Derive classes, override virtual functions, and demonstrate runtime polymorphism through a base-class pointer

  • Distinguish virtual from non-virtual destructors and show the failure mode of the wrong choice

  • Use abstract classes with pure virtual functions to define an interface

  • Explain object slicing and demonstrate it with a concrete example

Your checkpoint

A small polymorphic program with an abstract base class and three derived classes stored in a container of smart pointers, plus a comment block showing the output with and without a virtual destructor

Week 7

C++ Essentials 2 (CPP102 / CPPE2) aligned objectives

  • Use templates to write a function template and a class template, and explain instantiation

  • Apply the standard library algorithms and lambdas to filter, transform, and accumulate a container

  • Use smart pointers (unique_ptr and shared_ptr) and justify ownership choices

  • Handle exceptions with try, catch, and custom exception types, and write exception-safe cleanup

Your checkpoint

A generic pipeline program that reads records into a container, processes them with at least three standard algorithms and lambdas, stores objects via smart pointers, and reports errors through exceptions

Week 8

C++ Essentials 1 (CP101 / CPPE1) aligned objectives & C++ Essentials 2 (CPP102 / CPPE2) aligned objectives

  • Re-solve missed or shaky exercises from weeks 1 through 7 without notes, then compare against your earlier solutions

  • Write two timed practice programs of roughly 45 minutes each that combine classes, containers, and polymorphism

  • Produce a personal error sheet listing your five most frequent mistakes with the corrected pattern for each

  • Verify that every program in your folder compiles with warnings enabled and passes a sanitizer run

Your checkpoint

A timed mock set of two programs completed under 90 minutes total with a self-graded rubric, plus the final one-page error sheet and a clean sanitizer report for the whole folder

Milestones

Week 2: You can write, compile, and debug a two-file program using functions, arrays, and strings from a blank editor in under 30 minutes without looking anything up

Week 4: You can read a short pointer-and-array snippet and state its output and any memory bug before compiling it, scoring at least 4 of 5 on your own set of snippets

Week 6: You can explain, in writing and without notes, why a base class needs a virtual destructor and demonstrate the bug it prevents

Week 8: Both timed practice programs compile with -Wall -Wextra and no warnings, run correctly on edge-case input, and pass a sanitizer run, and your error sheet is complete