I am busy with a project and want to know what is Generic iterator class for arrays of type T and how do i write one. I have look in books and on websites and i cant find anything on it. Please help. But dont write code for me.
I am busy with a project and want to know what is Generic iterator
Share
Probably a class that has operators unary
*,++and possibly--defined, where the first one returns a reference to the underlyingTobject, the second advances the iterator to the next element in the container and the last one advances the iterator backwards.Or, if you’re using some standard container, just the return value of
yourContainer.begin()oryourContainer.find().If you elaborate on your question you can get a better answer. For example, what container are you using? What’s expecting a generic iterator?