Quiz: Beute zählen
#include <iostream>
#include <map>
#include <string>
int main() {
std::map<std::string, int> beute = {{"Trank", 1}, {"Edelstein", 2}};
beute["Edelstein"] += 3;
beute["Brot"]++;
std::cout << beute["Helm"] << std::endl;
for (const auto& [gegenstand, anzahl] : beute) {
std::cout << gegenstand << ": " << anzahl << std::endl;
}
return 0;
}