STL 小白学习(9) 对组

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;
}

猜你喜欢

转载自www.cnblogs.com/likeghee/p/10180735.html