Report the orders
A candle shop restocks lots, clears sold-out scents and reports orders with C++ ranges.
What needs to change
Repair report so the count, the total and the rejected line numbers are all right.
Reproduce
- Build with clang++ -std=c++2c -Wall -Wextra -pedantic main.cpp -o main, then pipe the sample orders into ./main and compare both report 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, isWhole, the Report struct and the complete main.
Input: one physical order per LF/CRLF-delimited line, including blank lines. Surrounding ASCII space/tab/CR framing is removed. The supplied isWhole accepts only nonempty ASCII digits representing a nonnegative int; signs, nondigits and out-of-range values are rejected.
This track uses 32-bit int: the accepted total and the number of physical records fit 0 through 2147483647. Invalid individual records remain rejectable. The range check is supplied; repair report rather than the decoder.