forked from Mooophy/Cpp-Primer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex17_1_2.cpp
29 lines (25 loc) · 834 Bytes
/
ex17_1_2.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/***************************************************************************
* @file main.cpp
* @author Yue Wang
* @date 3 Mar 2014
Jun 2015
* @remark This code is for the exercises from C++ Primer 5th Edition
* @note
***************************************************************************/
//
// Exercise 17.1:
// Define a tuple that holds three int values and initialize the members to 10, 20, and 30.
//
// Exercise 17.2:
// Define a tuple that holds a string, a vector<string>, and a pair<string, int>.
//
#include <tuple>
#include <string>
#include <vector>
int main()
{
auto three_ints = std::make_tuple(10, 20, 30);
using SomeTuple = std::tuple < std::string, std::vector<std::string>, std::pair<std::string, int> > ;
SomeTuple some_tuple;
return 0;
}