A contact book

The problem

Build a program that adds, searches, deletes and lists contacts from typed commands, and saves them to a file between runs.

Requirements

Technologies

Step by step

  1. Define the Contact type, and write a function that prints one.
  2. Write functions for adding, finding and deleting, each taking the map by reference.
  3. Write the list function, taking the map by const reference.
  4. Write save and load, using one line per contact.
  5. Write the command loop, reading a line and splitting it with a string stream.
  6. Add checks for missing arguments and unknown names.
  7. Restart the program and confirm that the contacts came back.
  8. Compile with -Wall -Wextra, and fix every warning.

Expected result

A working command-line address book whose data survives between runs.

How it is evaluated

Ways to improve it