I'm learning modern C++ and sometimes I see values passed by reference written slightly differently with a space.
int &i
Is there a difference?
int& x
#include <iostream>
using namespace std;
void swapnum(int &i, int &j) {
int temp = i;
i = j;
j = temp;
}
void f(const int& x) {
int& y = const_cast<int&>(x);
++y;
}