Saturday, May 22, 2010

Need Help With This C++ Code?

#include "doublelist.h"





DoubleLinkedList* dl_insert( DoubleLinkedList*%26amp; list, int id )


{


DoubleLinkedList* link = new DoubleLinkedList( id );


/*


* TODO: insert the new link onto the list


*/


;


return link;


}





void dl_remove( DoubleLinkedList*%26amp; list )


{


/*


* TODO: detach the link from the list


*/





delete list;


list = 0;


}





DoubleLinkedList::DoubleLinkedList( int _id )


{


id = _id;


next = 0;


prev = 0;


}

Need Help With This C++ Code?
It's Double Linked List. What about it?
Reply:What did you need help with? There isn't anything coded in the TODO section.


No comments:

Post a Comment