C/C++ Arena

Step 6 of 6

Challenge: load a config

Put the pieces together in the kind of code every service has: a config loader that reports precise errors, because "invalid config" with no line number wastes everyone's time.

Your turn: write ConfigResult load_config(const std::string& text). The text has one key=value per line:

Lines are numbered from 1. Stop at the first error.

Previous: Passing errors up