
please wait
while(!din.eof())
line (line 27 below) with a for loop for(int i=0; i<NUM_LINES; i++)
, and this seemed to help, but I was given the first three elements (all string types) followed by a row of zeroes, with this line repeating until the end of the loop. I've included the method in which I believe the problem is located below. I was wondering if someone could take a look at my code and let me know where the problem is. Thanks.
|
|
head
should only be updated if it is NULL. If you intend to read the list again from the beginning. head
looking for the end of the list.Node
pointer of temp
to point to NULL to mark the end of the list. Then, point the Node
pointer of the current node (CurNode) to the newly allocated node, which is temp
.print
function traverse the list starting from head
until you reach the end marker, which is NULL.