Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 11 Online
OpenStudy (anonymous):

How do I implement this function in a sequence class with a linked list toolkit? // void remove_current( ) // Precondition: is_item returns true. // Postcondition: The current item has been removed from the sequence, and the // item after this (if there is one) is now the new current item.

OpenStudy (anonymous):

void sequence::remove_current () { if (is_item ==true) node *target_ptr; target_ptr=list_search(head_ptr, target); if (target_ptr == NULL) return false; target_ptr-> set_data(head_ptr-> data()); list_head_remove(head_ptr); --many nodes; return true; } } How do I fix my code above?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!