Formatting
This book makes a point of only putting
one pointer definition on a line, and initializing each pointer at the point of
definition whenever possible. Because of this, the formatting style of
“attaching” the ‘*’ to the data type is
possible:
int* u = &i;
as if int* were a discrete
type unto itself. This makes the code easier to understand, but unfortunately
that’s not actually the way things work. The ‘*’ in
fact binds to the identifier, not the type. It can be placed anywhere between
the type name and the identifier. So you could do this:
int *u = &i, v = 0;
which creates an int* u, as
before, and a non-pointer int v. Because readers often find this
confusing, it is best to follow the form shown in this
book.