Text-Based Quiz App with File-Based Questions
A quiz application that loads multiple-choice questions from a structured text file, presents them one at a time with a timer, and tallies a final score with per-category breakdown. Learners practice file parsing, struct/class modeling, and basic timing with chrono in C++.
- Estimate
- ~6.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
fstream · chrono
Project roadmap
- 01
Define the Question struct and file format
~1hDesign a simple text file format for questions, choices, and correct answers, and a Question struct to hold them.
- 02
Implement the question file parser
~1.5hRead and parse the question file into a vector of Question, validating the format.
- 03
Build the quiz presentation loop
~1.5hDisplay each question and choices, read the user's answer, and track correctness.
- 04
Add a per-question timer
~1.5hUse std::chrono to enforce a time limit per question, counting unanswered questions as wrong.
- 05
Show final score and category breakdown
~1hTally overall score and per-category correctness, printing a summary at the end.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack