I've heard that hiding a pointer type in a typedef is a bad practice, but this was the assignment given to us. Im having a hard time accessing the lists and "copying" the list. How to copy the pFirst to temp and how to access pLink which is inside pFirst, thanks. next is the one for copying the next link.
Code:
typedef struct
{ char strIDNo[9];
/* any other information for student here */
}studentType;
struct nodeTag
{
studentType sData;
struct nodeTag *pLink;
};
typedef struct nodeTag nodeType;
typedef nodeType * ptrNode;
void sort(ptrNode *pFirst){
ptrNode *temp,*next;
temp=pFirst;
next=pFirst->pLink;