Hello guys!
I have a problem, or maybe some misunderstanding. I'm writing my semestral project to school. In short, we have to create model of "Santa sleight". It contains moose, reindeer .. SANTA .. technical vehicle and also vehicle with presents. This is no problem, I already have lot of work done.
But all of these objects (or better poiters) must be stored in some kind of template container, with given interface.
This is the interface:
http://pastebin.com/mHXDHK1S
Well, for storing, we can use everything what we want (STL containers, array, linear list..). So as you can see, I'm using STL vector.
The problem is, that I don't know, what should I write into class iterator/reverse iterator also into that four methods. I know, that vector already have methods for iteration (.begin(), .end(), rbegin(), .rend()). Also if I want to remove some element from container, I first must set iterator on proper position and then send it through method parameter and and...
Well, i really don't know, how to continue. Could you guys help me with some hint?
Some of my friends do this by that linear list and already have their own iterator implemented. But why to create linear list and all the stuff, when you have STL containers. :-)
Thank you!