Add a hotel night
A trip planner updates days and hotel nights and keeps earlier plans for undo.
What needs to change
Repair with_nights so the planned trip keeps its hotel nights.
Reproduce
- The starter does not compile; read the diagnostic before changing the code.
Acceptance criteria
Your review marks · Saved in this browser. Test acceptance is tracked separately.
Notes
The file contains its imports, read_lines, the Hotel and Trip structs, parse and the complete main.
Input: up to 50 city days hotel nights trips, one per record. Use nonempty LF/CRLF records with ordinary spaces or tabs between fields. City and hotel names are opaque non-whitespace UTF-8 tokens of at most 100 Unicode scalar values; numeric-looking names remain strings. Durations are unsigned decimal counts from 0 to 1000, including leading-zero spellings. The supplied readers receive valid bounded data; they do not validate these rules.