Since pointers to structures are common, and the parentheses in the example above are a nuisance, there's another structure selection operator which works on pointers to structures. If p is a pointer to a structure and m is a member of that structure, then
p->m
selects that member of the pointed-to structure. The expression p->m is therefore exactly equivalent to
(*p).m
You on the other hand are using some vague combination. Use either format.
E.g. last->pt
or (*last).pt
Also these lines contain asterisks that don't belong there I believe:
if(*top == NULL)
*top = temp;
else
*last->pt = temp; //FIX ME - something is going wrong at this point
*last = temp;
All together, this should work:
if(top == NULL)
top = temp;
else
last->pt = temp;
last = temp;
(Assuming you want to change the address the pointer is pointing to. If you use a asterisk in front of it you are comparing/assigning with the actual value the pointer is pointing to.