I have a pair vector that looks like this:
vector<pair<string,double>> revenue;
I'd want to add a string and a double from a map that looks like this:
revenue[i].first = "string";
revenue[i].second = map[i].second;
However, because revenue is not initialised, it returns an out of bounds error.
So I ...READ MORE
Jul 26, 2022
in C++
by
Nicholas
• 7,760 points
•
711 views