prog.cpp: In function 'int main()':
prog.cpp:14:24: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int'
exchange (value, 42);
^
prog.cpp:4:6: note: in passing argument 2 of 'void exchange(int&, int&)'
void exchange (int & lhs, int & rhs) {
^