I have a vector of pair like such:
vector
pair
vector> revenue;
I want to add a string and a doub
IMHO, a very nice solution is to use c++11 emplace_back function:
revenue.emplace_back("string", map[i].second);
It just creates a new element in place.