cpp11/tuple.cc

19 lines
320 B
C++
Raw Normal View History

2012-05-05 08:15:15 -07:00
#include <tuple>
#include <iostream>
using namespace std;
// make a function that returns multiple values
int main() {
tuple<int, int> c = make_tuple(5, 4);
cout << get<0>(c) << endl;
int a = 0;
int b = 1;
cout << a << endl;
cout << b << endl;
// swap a, b
// get a,b from func ...
}