tuple(new)

#include <tuple>
#include <iostream>
using namespace std;

int main()
{
    tuple<int,short,string> t1(1,2,"abc");
    cout << get<0>(t1) << get<1>(t1) << get<2>(t1) << endl;

    auto t2 = make_tuple("a","b");
    cout << get<0>(t2) << get<1>(t2) << endl;
}

12abc
ab

你可能感兴趣的:(new)