#include <iostream> using namespace std; int xx(int &t); int main(){ int x = 2; xx(x+1); cout << x; } int xx(int &y){ }
Standard input is empty
prog.cpp: In function 'int main()': prog.cpp:8:9: error: invalid initialization of non-const reference of type 'int&' from an rvalue of type 'int' xx(x+1); ^ prog.cpp:5:5: note: initializing argument 1 of 'int xx(int&)' int xx(int &t); ^
Standard output is empty