ok, I know that
int *ptr;
is a pointer to/of an int
.
and if I were to
int i = *ptr;
I am dereferencing that pointer to a value
.
but my question is, WHY is it so common to use
int *ptr;
and not
int* ptr;
instead? they're essentially the same thing, but the first example kinda looks like a dereference rather then a pointer declaration, whereas the second example is a very clear definition of a pointer.