No difference at all.
It is just a matter of style.
I personally prefer this:
int *x;
over this,
int* x;
Because the latter is less readable when you declare many variables on the same line. For example, see this:
int* x, y, z;
Here x
is a pointer to int
, but are y
and z
pointers too? It looks like they're pointers, but they are not.