Keep one serial stream
Two museum desks issue tickets from one live serial stream, beginning after 100.
What needs to change
Repair serial.hpp so both desks keep the museum’s one-stream policy.
Reproduce
- Build with clang++ -std=c++2c -Wall -Wextra -pedantic main.cpp board/desk.cpp -o program && ./program; supply ABBA and compare the second and issued lines.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
serial.hpp is the editable file used by main.cpp and board/desk.cpp. Input contains A/B requests, including an empty request sequence.
The supplied input is one LF/CRLF-delimited line of up to 1000 A/B requests, including an empty sequence. These are valid desk selectors; input validation is not the repair.
The supplied entry reader removes the CR of a CRLF terminator before the desk loop. Repair serial.hpp, preserving that framing behavior.