Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <tuple>
- using namespace std;
- auto myFunction() {
- return make_tuple('B', "28", "Mario");
- }
- int main()
- {
- auto t1 = make_tuple('A',"21", "Joe John");
- cout << get<0>(t1) << " " << get<1>(t1) << " " << get<2>(t1) << endl;
- get<0>(t1) = 'B';
- get<1>(t1) = "77";
- get<2>(t1) = "Marc";
- cout << get<0>(t1) << " " << get<1>(t1) << " " << get<2>(t1) << endl;
- auto t2 = myFunction();
- cout << get<0>(t2) << endl;
- cout << get<1>(t2) << endl;
- cout << get<2>(t2) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement