| 6 | #include <string> |
| 7 | |
| 8 | int main() |
| 9 | { |
| 10 | const std::map<int, std::string> cppStds = { |
| 11 | {11, "C++11"}, {14, "C++14"}, {17, "C++17"}, {20, "C++20"}}; |
| 12 | |
| 13 | const int key = 20; |
| 14 | |
| 15 | if(cppStds.find(key) != cppStds.end()) { |
| 16 | std::cout << "Found\n"; |
| 17 | } else { |
| 18 | std::cout << "Not found\n"; |
| 19 | } |
| 20 | } |