bhylu.com

Advertisements

C++ Study Plan

Follow observable milestones from a first build to a reviewed ownership-aware project.

Your brief

Begin by compiling a one-file program and explaining its result. Continue with values, validation and container bounds before borrowing their storage. Learn functions and value types before complex inheritance; study RAII and ownership before custom lifecycle code. Then use algorithms, templates and files to finish a small feature. Concurrency comes after you can explain ordinary object lifetime. This route is guidance, not a saved progress profile, promised completion date or qualification.

Run it locally

Use a C++20 compiler and matching standard library in a separate lab folder. The command uses c++; substitute g++, clang++ or zig c++ for your toolchain. C++ does not currently run in Bhylu’s browser playground. Apache, PHP and MySQL are not needed.

c++ -std=c++20 -Wall -Wextra -Wpedantic -Werror study-plan.cpp -o lesson

On Windows use -o lesson.exe and run .\lesson.exe in PowerShell. On Unix-like systems run ./lesson. Thread examples may need -pthread on your platform.

Download the complete C++ source. Run file labs in a private empty directory, away from existing reports.

Worked solution

Show the worked solution
C++20 · study-plan.cpp

#include <iostream>
#include <array>
#include <string_view>

int main() {
    constexpr std::array<std::string_view, 5> milestones{"Build one file", "Validate values", "Explain ownership", "Test a boundary", "Review a project"};
    for (std::size_t i = 0; i < milestones.size(); ++i) { std::cout << i + 1 << ". " << milestones[i] << '\n'; }
}

Expected result

1. Build one file
2. Validate values
3. Explain ownership
4. Test a boundary
5. Review a project

Each milestone needs evidence: a clean build, a predicted result, an ownership explanation, a rejection test or a reviewed project. The source uses only already-taught fixed containers and text views of static literals. Keep source and meaningful tests under version control so later changes can be compared with known behaviour. Review one weak milestone before adding another framework or abstraction.

Extend and test

Choose the earliest milestone you cannot demonstrate without guessing. Write one small program and one boundary test, then explain both in ordinary language.

Consult the WG21 C++ working group and the C++ Core Guidelines for language references and design guidance. Check the selected standard version and your implementation’s library support.

Advertisements