Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/container/map"

From cppreference.com
< cpp‎ | container
m
m
Line 150: Line 150:
 
{
 
{
 
     // Create a map of three (string, int) pairs
 
     // Create a map of three (string, int) pairs
     std::map<std::string, int> m{<!---->{"CPU", 10}, {"GPU", 15}, {"RAM", 20}<!---->};
+
     std::map<std::string, int> m = {{"Vandalized?", (int)true}};
  
 
     print_map("1) Initial map: ", m);
 
     print_map("1) Initial map: ", m);

Revision as of 14:29, 15 September 2023

|} -->