My book says
typedef Card* Cardptr;
"defines the new type name Cardptr
as a synonym for type Card*
." I see that the *
symbol modifies only Cardptr
and that other synonyms if there were any more, are not modified by the *
symbol. This is confusing to me. My book makes it seem like the actual structure type is Card*
, which makes me think that other synonyms would have the type Card*
as in
typedef Card* Cardptr, n;
where n
would also have the type Card*
. Wouldn't it be clearer if they moved *
symbol like this?
typedef Card *Cardptr, n;
That way, you would know that the type is actually Card
, that Cardptr
is simply a pointer to it, and that n
is not a pointer. What is the reason for this?