creating large maps cpp

include

include

using namespace std;

int main() { map studentScores; // Create a map with key as string and value as int studentScores["Alice"] = 95; // Add a key-value pair to the map studentScores["Bob"] = 87; studentScores["Charlie"] = 91;

// Access and modify elements in the map
cout << "Bob's score: " << studentScores["Bob"] << endl;
studentScores["Bob"] += 5; // Increase Bob's score by 5
cout << "Bob's updated score: " << studentScores["Bob"] << endl;

// Iterate through the map
for (auto const& pair : studentScores) {
    cout << pair.first << ": " << pair.second << endl;
}

// Check if a key exists in the map
if (studentScores.find("David") == studentScores.end()) {
    cout << "David's score is not in the map" << endl;
}

return 0;

}