#include <iostream>
#include <map>
#include <vector>
#include <string>

std::map<unsigned, std::vector<std::string>> rooms=
{
    { 1, { "a pebble", "a boulder", "a corpse" } },
    { 2, { "a pink elephant", "a ballerina" } },
    { 3, {} },
    { 4, { "the end of the world" } }
};

int main()
{
    const char* prompt = "Which room would you like to visit?\n> ";

    unsigned room_no;
    while (std::cout << prompt && std::cin >> room_no)
    {
        auto it = rooms.find(room_no);

        if ( it == rooms.end() )
        {
            std::cout << "Unable to find the room number \"" << room_no << "\"\n";
            std::cout << "Terminating program.\n";
            return 0;
        }

        if (!it->second.empty())
        {
            std::cout << "Room " << room_no << " contains:\n";

            for (auto& item : it->second)
                std::cout << '\t' << item << '\n';
        }
        else
            std::cout << "Room " << room_no << " appears to be empty.\n";
    }
}