Report who answered
A coffee survey records cups per day, where 0 is a real answer and a blank means the question was skipped.
What needs to change
Repair describe so each reported name shows as answered, blank or not surveyed.
Reproduce
- Compile and run the sample report with g++, then compare each reported name and the surveyed line with the expected stdout.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its headers, readLines, cut, parseAnswer and main. The browser compiles with g++ -std=c++23.
Input: answer lines, then a last line that starts with report and lists names. answers maps each surveyed name to a std::optional<int>.
Pilot input: at most five distinct surveyed people with single-token names and whole answers from 0 to 20 or blanks, followed by the supplied report command, with one separating space as shown. Requested names may be absent or repeated. The reader does not validate these bounds.