Thanks for your response.
It makes sense to me that have to match so I have changed the printname and ListInsert to use a const void * type and that elimated the errors but created a new one in ListInsert function.
Here is the code for that.
Code:
bool ListInsert(List *l, Position p, const void *item) {
ListNode *tmp;
tmp = (ListNode *)malloc(sizeof(ListNode));
if (tmp == NULL) {
return false; // No memory
}
tmp->item = item;
if (p == NULL) { // insert at head
tmp->next = l->head;
l->head = tmp;
}
else {
tmp->next = p->next;
p->next = tmp;
}
return true;
}
The line reporting the error is
would this mean i would need to change void *item to const void *item
I think I am a bit stumped on the usage of const.
Thanks Again for you help.