Hello guys..

I am really new to OOP (object-oriented programming) with C++. I am trying to make a simulation window program. I have a bit confused about apply linked-list inside the class. I mean, I am trying use linked-list to do adding item menu. Yes, I make the lists of menu that consist of add item and delete item. Is the data structure I used (linked - list ) wrong and not be compatible inside class ? Is there another data structure better than linked-list ? I will be appreciate for your help. Thank you very much

Recommended Answers

All 3 Replies

It would be helpful if you posted your code.
(don't forget the code tags)

>>Is the data structure I used (linked - list ) wrong and not be compatible inside class ?
No -- you should be able to use a linked list within a class

>> Is there another data structure better than linked-list ?
Yes -- use either <vector> (which is an array) or <list> (which is a linked list)

Woah,, thank you for you appreciation to help me. After I learn from many sources at web, I am now be able to apply the double linked-list within a class succesfully without a problem. :D

Besides that, I realize that OOP is more amazing than procedural programming. hehehe :D Hope I can improve my OOP fast. Wish me luck hehehe :D

Wishing you all properous day. :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.