Comparison of programming languages (associative array): Difference between revisions

Content deleted Content added
m Windows PowerShell: lang=PowerShell
C++: c++17 example
Line 139:
for(const auto& curr : phone_book)
std::cout << curr.first << " = " << curr.second << std::endl;
</source>
 
Using the structured binding available in [[C++17]]:
 
<source lang=Cpp>
for (const auto& [name, number] : phone_book) {
std::cout << name << " = " << number << std::endl;
}
</source>