📅  最后修改于: 2022-03-11 14:44:45.783000             🧑  作者: Mango
#include
using namespace std;
int main() {
typedef vector< tuple > my_tuple;
my_tuple tl;
tl.push_back( tuple(21,20,19) );
for (my_tuple::const_iterator i = tl.begin(); i != tl.end(); ++i) {
cout << get<0>(*i) << endl;
cout << get<1>(*i) << endl;
cout << get<2>(*i) << endl;
}
cout << get<0>(tl[0]) << endl;
cout << get<1>(tl[0]) << endl;
cout << get<2>(tl[0]) << endl;
return 0;
}