Connecting Tech Pros Worldwide Forums | Help | Site Map

linkedlist and checking for duplicates,

Spockie
Guest
 
Posts: n/a
#1: Jul 22 '05
I do not use linkedlist stdlibrary, vector

i make my own, but i have problems with one issue, and that is checking if
there are duplicates in the middle of inputing information

line 294 http://cpp.enisoc.com/pastebin/?3935

i overload cin to get class video tape data, After i enter one data
member for VideoTape class, i need it to check if that data is duplicated
in the other class linkedlist, i am not sure about how to do this though
because things like


linkedlist<VideoTape>::addNode(VideoTape(vtape.nam e));


do not work.

John Harrison
Guest
 
Posts: n/a
#2: Jul 22 '05

re: linkedlist and checking for duplicates,



"Spockie" <spockie@verizon.net> wrote in message
news:Xns94D7A2BC8CFspockieverizonnet@199.45.49.11. ..[color=blue]
> I do not use linkedlist stdlibrary, vector
>
> i make my own, but i have problems with one issue, and that is checking if
> there are duplicates in the middle of inputing information
>
> line 294 http://cpp.enisoc.com/pastebin/?3935
>
> i overload cin to get class video tape data, After i enter one data
> member for VideoTape class, i need it to check if that data is duplicated
> in the other class linkedlist, i am not sure about how to do this though
> because things like
>
>
> linkedlist<VideoTape>::addNode(VideoTape(vtape.nam e));
>
>
> do not work.[/color]

The linked list class is very badly written. What you want to do cannot be
done with the current linked list class (that's how bad it is). I think you
have two choices, write a better version, or use the standard list class. I
know which I would choose.

john


Closed Thread