For example, if key 0 contains a vector containing a b c d and key 1 contains a vector containing 1 2 3 4, would there be any way to output a 1 b 2 c 3 d 4, instead of a b c d 1 2 3 4?
std::map
doesn't readily support that in an elegant manner. Obviously you could repeatedly iterate through all of the keys, maintain an index to the value, and output the element at that index. But this seems like more of a band-aid born from the wrong data structure choice.
So let's take a step back and figure out exactly what the purpose of this map is. Can you clarify?