Quiz: Counting Loot
#include <iostream>
#include <map>
#include <string>
int main() {
std::map<std::string, int> loot = {{"potion", 1}, {"gem", 2}};
loot["gem"] += 3;
loot["bread"]++;
std::cout << loot["helmet"] << std::endl;
for (const auto& [item, count] : loot) {
std::cout << item << ": " << count << std::endl;
}
return 0;
}