std::copy 到 std::cout 用于 std::pair

std::copy to std::cout for std::pair(std::copy 到 std::cout 用于 std::pair)

本文介绍了std::copy 到 std::cout 用于 std::pair的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有下一个代码:

#include <iostream>
#include <algorithm>
#include <map>
#include <iterator>

//namespace std
//{

std::ostream& operator << ( std::ostream& out, 
                const std::pair< size_t, size_t >& rhs )
{
    out << rhs.first << ", " << rhs.second;
    return out;
}
/

本文标题为:std::copy 到 std::cout 用于 std::pair

基础教程推荐