A Matter of Style
When declaring pointer and reference variables, some C++ programmers use a unique
coding style that associates the * or the & with the type name and not the variable. For
example, here are two functionally equivalent declarations:

int& p; // & associated with type
int &p; // & associated with variable

Associating the * or & with the type name reflects the desire of some programmers
for C++ to contain a separate pointer type. However, the trouble with associating the &
or * with the type name rather than the variable is that, according to the formal C++
syntax, neither the & nor the * is distributive over a list of variables. Thus, misleading
declarations are easily created. For example, the following declaration creates one, not
two, integer pointers.

int* a, b;

Here, b is declared as an integer (not an integer pointer) because, as specified by the
C++ syntax, when used in a declaration, the * (or &) is linked to the individual variable
that it precedes, not to the type that it follows. The trouble with this declaration is that
the visual message suggests that both a and b are pointer types, even though, in fact,
only a is a pointer. This visual confusion not only misleads novice C++ programmers,
but occasionally old pros, too.

It is important to understand that, as far as the C++ compiler is concerned, it
doesn’t matter whether you write int *p or int* p. Thus, if you prefer to associate the *
or & with the type rather than the variable, feel free to do so.