I am trying to do insertion sort with list (ADT), I wrote the function InsertionSortList in the sort.c file:
while i am compling my programme, the gcc complier said:Code:void InsertionSortList(List L) { Position P1, P2; ElementType temp; for(P1 = L; P1->Next != NULL; P1 = P1->Next) //problem { temp = P1->Element; //problem for(P2 = P1; (P2->Last != NULL) && (P2->Last->Element < P2->Element); P2 = P2->Last) //problem P2->Element = P2->Last->Element; //problem } }
dereferencing pointer to incomplete type
these problems happend at the lines which I indicate in the function
How can I deal with it? Thx a lot!



LinkBack URL
About LinkBacks


