- $ g++ -o reference reference.cpp
- reference.cpp: In function ‘int main()’:
- referencs.cpp:11:8: error: invalid initialization of non-const
- reference of type ‘int&’ from an rvalue of type ‘int’
- g (x + 1);
- ^
- references.cpp:5:6: error: in passing argument 1 of ‘void g(int&)’
- void g (int& y) {
- ^