Jump to content

C++ Language/Std/Stl/CollectionClasses/SortedCollections/Tuple

From Wikibooks, open books for an open world

A "tuple" is like a pair, except that a tuple can have more than two elements: std::tuple<char,int,float> cifVar('a', 11, 1.1F);. Access each component as std::get<0>(cifVar) or std::get<1>(cifVar) or std::get<2>(cifVar).

Additional information about tuple (includes interactive examples)