Top "Std-pair" questions

A std::pair is an ordered, heterogeneous sequence of exactly two objects (it is a special case of std::tuple).

What is the equivalent of the C++ Pair<L,R> in Java?

Is there a good reason why there is no Pair<L,R> in Java? What would be the …

java tuples std-pair
What is C# analog of C++ std::pair?

I'm interested: What is C#'s analog of std::pair in C++? I found System.Web.UI.Pair class, but …

c# .net data-structures std-pair base-class-library
Adding to a vector of pair

I have a vector of pair like such: vector<pair<string,double>> revenue; I want to …

c++ vector std-pair
How can I print out C++ map values?

I have a map like this: map<string, pair<string,string> > myMap; And I've inserted some …

c++ dictionary for-loop printing std-pair
Use of for_each on map elements

I have a map where I'd like to perform a call on every data type object member function. I yet …

c++ algorithm stl stdmap std-pair
What is the preferred/idiomatic way to insert into a map?

I have identified four different ways of inserting elements into a std::map: std::map<int, int> function; …

c++ stl insert stdmap std-pair
What is the purpose of std::make_pair vs the constructor of std::pair?

What is the purpose of std::make_pair? Why not just do std::pair<int, char>(0, 'a')? Is …

c++ stl std-pair
Using pair as key in a map (C++ / STL)

I want to use a pair from STL as a key of a map. #include <iostream> #include <…

c++ stl map std-pair
What is the difference between std::list<std::pair> and std::map in C++ STL?

What is the difference between std::list<std::pair> and std::map? Is there a find method for …

c++ stl stdmap std-pair stdlist
Sorting a vector of pairs

I have a question about sorting a vector of pairs: std::vector<std::pair<double,Processor*>> …

c++ sorting vector std-pair