< previous page
page_1071
next page >
Page 1071
Insert(60)
newNodePtr = new NodeType;
newNodePtr->component = item;
prevPtr = NULL;
currPtr = head;
These four statements initialize the variables used in the searching process. The variables and their contents are shown below.
while (currPtr != NULL &&
item > currPtr->component)
prevPtr = currPtr;
currPtr = currPtr->link;
Because 60 is greater than 30, this expression is TRUE and the loop body is entered.
Pointer variables are advanced.
< previous page
page_1071
next page >