The following is more of a general description rather than a direct answer to your question...
If you declare a variable of some type, then you can also declare another variable pointing to it.
For example:
int a;
int* b = &a;
There are two ways to "look at" variable b
(that's what probably confuses most beginners):
Hence, some programmers would declare int* b
, whereas others would declare int *b
.
But the fact of the matter is that these two declarations are identical (the spaces are meaningless).
You can use either b
as a pointer to an integer value, or *b
as the actual pointed integer value.
You can read the pointed value (e.g., int c = *b
) and write the pointed value (e.g., *b = 5
).