I have a vector of pair like such:
vector
pair
vector> revenue;
I want to add a string and a doub
As many people suggested, you could use std::make_pair.
std::make_pair
But I would like to point out another method of doing the same:
revenue.push_back({"string",map[i].second});
push_back() accepts a single parameter, so you could use "{}" to achieve this!