#include <iostream>
using namespace std;

int main() {
	int k = 10;
	int& foo = k;
	auto bar = foo; //value of foo is copied!
	bar = 5; //foo / k won't be 5
	cout << "bar : " << bar << " foo : " << foo << " k : " << k << endl;
	auto& ref = foo;
	ref = 5;
	cout << "bar : " << bar << " foo : " << foo << " k : " << k;
	return 0;
}