Skip to content

Add a tested C++ console input-validation experiment #2

Description

@devkyato

Answer the next question recorded in the Term 1 journal: how can console input errors be handled without leaving std::cin in a failed state?

Acceptance criteria

  • add a small C++17 program that requests an integer in a documented range
  • separate validation/calculation logic from console I/O where practical
  • cover valid, out-of-range, and non-numeric input
  • add automated tests without weakening -Werror / /W4
  • add a journal entry describing the failure-state behavior and evidence

Keep this focused on input state; do not turn it into a large application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions