Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

For auto map C

//Since c++11
for (const auto& kv : myMap) {
    cout << kv.first << " has value " << kv.second << endl;
}
//Since c++17
for (auto& [key, value]: myMap) {
    cout << key << " has value " << value << endl;
}
 
PREVIOUS NEXT
Tagged: #For #auto #map #C
ADD COMMENT
Topic
Name
9+4 =