Adding to a vector of pair

后端 未结 10 1415
悲哀的现实
悲哀的现实 2021-01-30 05:19

I have a vector of pair like such:

vector> revenue;

I want to add a string and a doub

10条回答
  •  一生所求
    2021-01-30 05:38

    You can use std::make_pair

    revenue.push_back(std::make_pair("string",map[i].second));
    

提交回复
热议问题