19 lines
320 B
C++
19 lines
320 B
C++
#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 ...
|
|
}
|