My friend showed me this code and asked me what is the & sign in the input parameter?
#include<iostream>
using namespace std;
void f(int & i, int j) {
i++;
j++;
}
int main() {
int i=1, j=2;
f(i, j);
cout << ( i + j );
return 0;
}
iinf()is a reference parameter. Thank you!