fork download
  1. #include <array>
  2. #include <vector>
  3. #include <utility>
  4.  
  5. int main()
  6. {
  7. typedef std::pair<double, double> PairType;
  8. std::vector<std::pair<double, std::array<PairType, 3> > > myVector;
  9.  
  10. double Key = 0.0;
  11. PairType Pair1 = std::make_pair(1.0, 2.0);
  12. PairType Pair2 = std::make_pair(3.0, 4.0);
  13. PairType Pair3 = std::make_pair(5.0, 6.0);
  14.  
  15. myVector.push_back(std::make_pair(Key, std::array<PairType, 3>{ Pair1, Pair2, Pair3 } ));
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
Standard output is empty