Manually inserting into a map Given map m; then can insert a pair with pair p("test", 42); m.insert(p); or more simply m.insert(pair("test", 42));