Input diagnostics tool
Read typed input, reject invalid values, and present a clear report with documented compiler commands.
Review evidence: Valid and invalid transcripts, warning-clean build, and an explanation of each validation rule.
Essential storage keeps sign-in and learning features working. Google Analytics measures visits; Microsoft Clarity records interactions to help us improve usability. Both are optional and stay off until you choose. Read our privacy policy.
Learn through clear explanations, code practice and quizzes across all 50 lessons. Build from your first program to modern C++, tested CMake projects and a documented command-line interface.
Start from the beginning without prior C knowledge. Basic computer and terminal familiarity helps; learners coming from C, Python, or JavaScript can use the roadmap to identify unfamiliar concepts.
Publication status: All 50 instructional lessons are available. Start with the introduction below. The five milestone projects are still briefs; their detailed tutorials, the assessment and the capstone remain planned, separate from the lesson count.
Explain the edit → compile → link → run loop and keep a reproducible development setup.
Understand compiled programs, the language versus its standard library, and the course's value-first approach.
Practice target: Map a command-line tool's inputs, transformations, outputs, and possible failures.
Read lessonChoose a Windows, macOS, or Linux toolchain and verify the selected compiler and C++ language mode.
Practice target: Record your compiler version and compile a tiny program from the terminal, not only an IDE button.
Read lessonRead headers, main, statements, namespaces, and console output without treating the program as magic.
Practice target: Print a three-line introduction and explain each part of the source file.
Read lessonDistinguish preprocessing, compilation, linking, and execution; identify the first useful diagnostic.
Practice target: Introduce a syntax error and a missing definition, then classify and repair both failures.
Read lessonUse warnings and a debugger to inspect actual state before changing a program based on guesses.
Practice target: Step through an incorrect total, inspect intermediate values, and write the cause before fixing it.
Read lessonRepresent data deliberately and keep invalid input from becoming hidden program state.
Compare declaration with initialization and trace the visibility and lifetime of local variables.
Practice target: Rewrite uninitialized local variables with explicit initial values and reduce their scopes.
Read lessonReason about integer division, signedness, range, narrowing, and floating-point approximation.
Practice target: Calculate an average without accidental integer division and explain why money needs a deliberate representation.
Read lessonSeparate immutability, compile-time constants, and type deduction rather than treating them as interchangeable shortcuts.
Practice target: Mark stable settings const and use auto only where the initializer makes the type clear.
Read lessonRead arithmetic, comparison, logical operations, precedence, and short-circuit evaluation.
Practice target: Write a delivery eligibility rule with named intermediate conditions and boundary cases.
Read lessonDistinguish formatted extraction from line input and handle stream failure without an endless retry loop.
Practice target: Accept an integer in a permitted range and recover from a non-numeric input line.
Read lessonRead typed input, reject invalid values, and present a clear report with documented compiler commands.
Review evidence: Valid and invalid transcripts, warning-clean build, and an explanation of each validation rule.
Turn a problem into small decisions, bounded repetition, and functions with clear contracts.
Learn if, else if and else with Boolean conditions, nested branches and guard clauses; test exact decision boundaries.
Practice target: Classify a ticket request with if/else and test below, at and above each threshold.
Read lessonChoose switch for discrete integral or enum cases, understand fallthrough and compare it with an if/else chain.
Practice target: Build a menu dispatcher with explicit cases, break and a default for unsupported commands.
Read lessonTrace initialization, condition and update in a for loop; practise counters, nested loops and off-by-one checks.
Practice target: Generate a multiplication table and test zero, one and several iterations without reading past a bound.
Read lessonCompare entry-tested while and exit-tested do-while loops; use break and continue with explicit termination rules.
Practice target: Build a bounded menu loop that exits on a command or end-of-input, then explain when its body runs.
Read lessonDefine functions with clear contracts, compare value and reference parameters, and introduce overloads and default arguments.
Practice target: Extract a price calculation into a pure function; explain its parameters and test normal and boundary cases.
Read lessonUse owning library types before manual storage, and reason about bounds and invalidation.
Create, compare, search, and slice strings while distinguishing bytes from user-perceived characters.
Practice target: Normalize a simple ASCII command and reject empty input without claiming Unicode normalization.
Read lessonUse a dynamic owning sequence and distinguish size, capacity, element access, and bounds checks.
Practice target: Collect scores, reject invalid entries, and compute a report for empty and non-empty input.
Read lessonChoose std::array for fixed-size data and identify invalid indices before they reach element access.
Practice target: Model seven daily readings and validate an external day index.
Read lessonTraverse values without unnecessary copies and recognize operations that invalidate iterators or references.
Practice target: Filter a vector safely and explain why erasing while incrementing blindly skips or invalidates work.
Read lessonCombine input, validation, transformation, and reporting without mixing every responsibility in one loop.
Practice target: Build a reading summary with count, minimum, maximum, and an explicitly handled empty case.
Read lessonOrganize readings in a vector, extract pure functions, and handle empty input and boundary values.
Review evidence: Expected outputs for empty, single-value, and mixed readings, plus a responsibility map for the functions.
Express valid states through small types and prefer ordinary value semantics over unnecessary hierarchy.
Group related data and replace unexplained numeric or string flags with scoped domain states.
Practice target: Model a task record with a scoped status and explicit display labels.
Read lessonUse a type's public interface to protect rules rather than exposing arbitrary mutations.
Practice target: Design a bounded quantity type that cannot silently hold a negative value.
Read lessonInitialize members deliberately, respect declaration order, and describe what a constructed object guarantees.
Practice target: Create an inventory item whose identifier and starting quantity are validated at construction.
Read lessonDistinguish observing an object from changing it, and build larger behavior by composing smaller types.
Practice target: Compose an order from line items and make read-only queries callable on const objects.
Read lessonReason about independent copies while relying on standard-library members for resource management.
Practice target: Copy a record containing a string and vector, mutate the copy, and explain the independence.
Read lessonMake ownership explicit and recognize dangling access before considering low-level optimization.
Connect scope exit and destructors to deterministic cleanup, including early return and exception paths.
Practice target: Trace the construction and destruction order of nested objects using a small logging type.
Read lessonCompare values, const references, mutable references and non-owning pointers; distinguish optional access from ownership.
Practice target: Compare value and reference parameters, then check an optional pointer lookup for nullptr before accessing it.
Read lessonRepresent a dynamically allocated object's single owner without routine manual new/delete pairs.
Practice target: Transfer an exclusively owned object and demonstrate that copying ownership is rejected.
Read lessonUnderstand move-enabled operations, valid moved-from states, and why std::move itself does not move anything.
Practice target: Trace a copy and a move, then reset and reuse a moved-from library object safely.
Read lessonDistinguish owning data from std::string_view and std::span, which do not extend the underlying lifetime.
Practice target: Identify a returned dangling view and redesign the interface with a valid owner or an owning return value.
Read lessonProtect item invariants with value types and demonstrate safe ownership and lifetime boundaries.
Review evidence: Copy/move scenarios, invalid construction cases, and a diagram explaining who owns each resource.
Choose a collection by the work it must support and use algorithms with valid range contracts.
Compare ordered and hash-based maps, missing keys, insertion, and read-only lookup behavior.
Practice target: Build a word-frequency report and avoid accidentally inserting during a lookup.
Read lessonChoose uniqueness or processing-order abstractions instead of forcing every problem into a vector.
Practice target: Model a unique tag list and a first-in-first-out processing queue.
Read lessonUse find, count, transform, and predicates; explain captures and their lifetime requirements.
Practice target: Filter and summarize records with small predicates whose captures remain valid.
Read lessonRespect sorted-range preconditions and strict ordering while comparing linear and logarithmic search costs.
Practice target: Sort records by a defined key, search the sorted data, and explain when binary search is invalid.
Read lessonRead filter/transform pipelines and distinguish a lazy view from a materialized owning result.
Practice target: Build a small range pipeline and keep the underlying container alive until iteration finishes.
Read lessonKeep failure visible at system boundaries and select explicit representations for missing or alternative data.
Use std::optional for absence and std::variant for a closed set of alternatives without sentinel values.
Practice target: Parse a lookup request and distinguish a missing result from a valid zero value.
Read lessonSeparate normal alternatives from exceptional failure and reason about cleanup without swallowing errors.
Practice target: Handle a failed load at the application boundary while leaving domain objects unchanged.
Read lessonRead and write text files, check stream state, and use filesystem paths without assuming one operating system.
Practice target: Load a small data file and report missing files and failed writes explicitly.
Read lessonSeparate syntax checks from domain rules and reject partial or malformed input deliberately.
Practice target: Parse a restricted record format, reject extra fields, and report the offending line number.
Read lessonUse virtual interfaces only when substitution is needed; understand overriding, slicing, and virtual destruction.
Practice target: Compare a composed storage adapter with a small polymorphic interface and justify the simpler design.
Read lessonLoad validated records, query by key, sort results, and report persistence failures explicitly.
Review evidence: Malformed-file fixtures, missing-key cases, and a documented recovery policy for failed writes.
Write reusable typed behavior and verify it with repeatable checks instead of output inspection alone.
Express type-independent behavior and recognize when a concrete function remains easier to understand.
Practice target: Write a small generic helper, instantiate it with two types, and inspect an invalid instantiation.
Read lessonState template requirements with C++20 concepts and distinguish a syntactic constraint from semantic correctness.
Practice target: Constrain a helper and explain both an accepted type and a rejected type.
Read lessonDesign deterministic tests around observable contracts, including empty, invalid, and exact-boundary inputs.
Practice target: Test pure inventory rules independently of files, the terminal, and the current clock.
Read lessonUse supported diagnostics to find memory and undefined-behavior bugs without treating a clean run as a proof.
Practice target: Investigate a deliberately isolated invalid-access example with a supported sanitizer configuration.
Read lessonSeparate algorithmic cost from micro-optimization and design a benchmark that checks correctness first.
Practice target: Compare two lookup approaches on representative input and report environment and measurement limits.
Read lessonConnect source organization, tooling, tests, and documentation into a reproducible release workflow.
Separate declarations from definitions, use include guards, and diagnose duplicate or missing symbols.
Practice target: Split domain code into a header and source file without including implementation files.
Read lessonDefine target-level sources, include paths, language requirements, and an out-of-source build.
Practice target: Configure and build an executable from a clean build directory with an explicit C++ standard.
Read lessonKeep dependency decisions reproducible and register tests so one command can verify a clean checkout.
Practice target: Register focused tests with CTest and document how dependencies are obtained.
Read lessonRecognize data races and scope-bound thread management; introduce synchronization without promising parallel speedups.
Practice target: Review a shared counter, identify the race, and compare a synchronized design with avoiding shared state.
Read lessonDefine commands, exit codes, help text, data safety, and a repeatable build/test checklist.
Practice target: Review a clean checkout against a README, test report, failure cases, and known limitations.
Read lessonPackage domain logic, storage, and command handling into CMake targets with automated tests.
Review evidence: Clean build instructions, CTest output, supported diagnostic checks, and a concise user guide.
Explain lifetime and ownership, repair a failing program, select a suitable container, and justify a test plan. Planned; no score or certificate is currently issued.
Build add, list, find, and update commands with validated records, file persistence, explicit error handling, automated tests, and reproducible CMake setup. Delivery includes a README and design review, not only source code.
Move through units in order if C++ is new to you. Before running an example, predict the result. Compile with warnings enabled, change one assumption, and explain what happened. Keep small experiments in Git so you can compare your reasoning with the actual diff.
At each milestone, work from the brief before looking at a solution. Keep normal, empty, invalid, and boundary cases. A program that runs once is not evidence that its lifetime rules, input handling, and failure paths are correct.
C++20 teaching baseline, with standard-library-first examples and explicit compiler-support notes. Newer features will be clearly labelled, not silently required. A local compiler is required for full-language exercises; selected beginner examples use a clearly limited browser interpreter. Shared ownership, templates, concurrency, and performance are introduced after lifetime fundamentals. GUI frameworks, game engines, networking libraries, and advanced lock-free programming are outside this first course.