forked from Mooophy/Cpp-Primer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex17_1_2.cpp
More file actions
29 lines (26 loc) · 839 Bytes
/
ex17_1_2.cpp
File metadata and controls
29 lines (26 loc) · 839 Bytes
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()
{
//ex17.1
auto three_ints = std::make_tuple(10, 10, 10);
//ex17.2
using SomeTuple = std::tuple < std::string, std::vector<std::string>, std::pair<std::string, int> > ;
SomeTuple t;
}