void test01() {
    //构造方法
    pair<int, int> p1(10, 2);
    cout << p1.first << p1.second << endl;

    pair<int, string> p2 = make_pair(10, "assd");
    cout << p2.first << p2.second << endl;

    pair<int, string> p3 = p2;
}

 

posted on 2018-12-26 17:59  likeghee  阅读(108)  评论(0编辑  收藏  举报