Postion of & or * to denote reference type or pointer
- by Matt H
I was wondering whether to put the ampersand (&) after the variable type or before the variable name. To put it simply, I want to know which one is the conventional style or the standard, or if it is entirely down to preference.
int &x;
int *x;
or
int& x;
int* x;