mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-01 20:40:42 +02:00
[C++/en] Tuples in C++
This commit is contained in:
@@ -966,11 +966,10 @@ v.swap(vector<Foo>());
|
||||
// its elements are accessed by their order in the tuple.
|
||||
|
||||
// We start with constructing a tuple.
|
||||
//
|
||||
// Packing values into tuple
|
||||
auto first = make_tuple( 10 , 'A' ) ;
|
||||
const int maxN = 1e9;
|
||||
int maxL = 15;
|
||||
const int maxL = 15;
|
||||
auto second = make_tuple( maxN , maxL ) ;
|
||||
|
||||
// printing elements of 'first' tuple
|
||||
|
Reference in New Issue
Block a user