C++ references, auto, and copies

F-REFS-V4-3hard

Restock every shelf

A hardware-store program records sales, fills bins and restocks shelves.

What needs to change

Repair restock so every delivery is added to its item’s shelf.

Reproduce

  1. Build with g++, run the sample deliveries and compare existing and newly added 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 includes, readLines, the Shelf type, parse and the complete main.

Input: one "item quantity" delivery per line.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in