|  |
|
|
|
|
The pointer to the new node is copied into currPtr. Now currPtr, newNodePtr, and head->link all point to the node containing 45.2 as its component. |
|
|
|
|
|
|
|
|
|
|
newNodePtr = new NodeType; |
|
|
|
|  |
|
|
|
|
A dynamic variable of type NodeType is created. The pointer to this new node is stored into newNodePtr. |
|
|
|
|
|
|
|
|
|
|
newNodePtr->component = 70.1; |
|
|
|
|  |
|
|
|
|
The value 70.1 is stored into the component member of the new node. |
|
|
|
|
|