I'm trying to print the list of a singly linked list that I referred to in link text
It works, but I do get the compiler warnings
"Initialization discards qualifiers from pointer target type"(on declaration of start = head) and return discards qualifiers from pointer target type"(on return statement) in this code (I am using XCode):
/* Prints sinly linked list and returns head pointer */
LIST *PrintList(const LIST *head)
{
LIST *start = head;
for (; start != NULL; start = start->next)
printf("%15s %d ea\n", head->str, head->count);
return head;
}
Any thoughts? Thanks!