Clear sold-out scents
A candle shop restocks lots, clears sold-out scents and reports orders with C++ ranges.
What needs to change
Repair clearSoldOut so sold-out scents leave the shelf.
Reproduce
- Build with clang++ -std=c++2c -Wall -Wextra -pedantic main.cpp -o main, then pipe the sample scents into ./main and compare the shelf lines 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, the Item struct, parse and the complete main.
Input: up to 50 scent/count records, one per line, with ordinary spaces/tabs between fields. A scent is an opaque nonempty token and counts are decimal integers from 0 through 1000; leading zeros denote the same numeric count. The supplied reader receives valid records.