#includeint main() { SCP_map m; // Insert key-value pairs m.insert({1, "one"}); m.insert({2, "two"}); m.insert({3, "three"}); // Access elements std::cout << m[1] << std::endl; // prints "one" std::cout << m[2] << std::endl; // prints "two" return 0; }
#includeint main() { SCP_map m; // Insert key-value pairs m.insert({1, "one"}); m.insert({2, "two"}); m.insert({3, "three"}); // Iterate over the map for (auto& p : m) { std::cout << p.first << " -> " << p.second << std::endl; } return 0; }
#includeThis package library is SCIP (SCIP Optimization Suite).int main() { SCP_map m; // Insert key-value pairs m.insert({1, "one"}); m.insert({2, "two"}); m.insert({3, "three"}); // Find an element auto it = m.find(2); if (it != m.end()) std::cout << it->second << std::endl; // prints "two" return 0; }