fork download
  1. #include <iostream>
  2. #include <tuple>
  3. using namespace std;
  4.  
  5. int main() {
  6. int x = 10;
  7. string y = "aoeu";
  8. tuple<int&, string&> z(x, y);
  9.  
  10. x = 15;
  11. y = ";qjk";
  12.  
  13. cout << get<0>(z) << ", " << get<1>(z) << endl;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3468KB
stdin
Standard input is empty
stdout
15, ;qjk