iccaros Posted March 24, 2006 Report Share Posted March 24, 2006 (edited) ok I have two constutors~List(); // destructor List( const List< NODETYPE > & ); // copy constructornow I need to create a funtion that passes object of type List to the second constutorhere is my failed try(If I make this a funtion like void CopyList ( const List< NODETYPE > & ); then I can make it work.. but as a construtor I am lost..)template<class T>void concatenate ( List <T> &listObject1, List <T> &listObject2){ listObject1.List(const List<string> & listObject2);}if I change it to its own funtion it works with thistemplate<class T>void concatenate ( List <T> &listObject1, List <T> &listObject2){ listObject1.CopyList(listObject2);} Edited March 24, 2006 by iccaros Quote Link to post Share on other sites
iccaros Posted March 25, 2006 Author Report Share Posted March 25, 2006 (edited) ok I got the contrutor to call List <T> tempData = listObject1;but now I must cantonate two objects.. ?? any one know the logic.. not code just logic..right now I am tring to call a new object that uses a copy constutor to make a copy of object two.. then copy to the end of the linked list the contents of object twoThanks Edited March 25, 2006 by iccaros Quote Link to post Share on other sites
iccaros Posted March 25, 2006 Author Report Share Posted March 25, 2006 never mind have my answer.. needed to have a pointer to the data... sorry if this is cryptic and if anyone is intrested I will send a coy after next week, but this is for homework, hence I just wanted logic as I need to find th eanswers on my own in code.. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.