Added tuple example.

This commit is contained in:
Stephen M. McQuay 2012-05-05 09:15:15 -06:00
parent 71adea8733
commit ea645e96d9

18
tuple.cc Normal file
View File

@ -0,0 +1,18 @@
#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 ...
}