But I tried arguing with my professor, saying isnt the whole point of a container to stores things dynamically and not a fixed size, well I think this made him angry and now he is expecting me to use a linked list, (which he hasnt covered in class yet), here is my add method

Replies To: Need Help With Linked Lists for container

Re: Need Help With Linked Lists for container

Posted 28 October 2006 - 12:07 PM

I don't understand your question. A container holds something, It doesn't HAVE to be dynamic, unless the objects your holding in your container IS NOT of fixed size. When you hold different things in a container you will want to use pointers to point to the objects so that "slicing" doesn't occur.

As far as linked lists go, I had to implement my own in a C++ class and they are far more hassle than worth. I guess you COULD use the STL list implementation, but I haven't used it to know if it would do any good.

If your question is help with creating a linked list from scratch I could help you out alittle bit.