The hotel front desk looks up room numbers by guest name. Write room_of(rooms, guest): if the guest is in rooms, return their room number; if not, return 0.
room_of({{"Amy", 101}, {"Bao", 205}}, "Bao")→205room_of({{"Amy", 101}}, "Zed")→0int room_of(const map<string, int> &rooms, const string &guest)#include <map>
#include <string>
using namespace std;
int room_of(const map<string, int> &rooms, const string &guest) {
// your code here: if the guest is there, return their room number
return 0;
}
Run tries the examples. When they look right, Submit.