cpp map iterate over keys
#include <iostream>
#include <map>
int main() {
std::map<int, std::string> myMap = {{1, "One"}, {2, "Two"}, {3, "Three"}};
// Iterate over keys using a range-based for loop
for (const auto& pair : myMap) {
int key = pair.first; // Access the key
std::cout << "Key: " << key << std::endl;
}
return 0;
}