if i got an iterator
how can i sure that it is a random access iterator??
will it be a way for testing it??
thank for reply
regard
SAto
Printable View
if i got an iterator
how can i sure that it is a random access iterator??
will it be a way for testing it??
thank for reply
regard
SAto
If I am not wrong, only iterators from std::vector and std::string are random access iterator.
You might write your own container with random-access iterators...
There is std::iterator_traits that can tell you the category of an iterator. This requires some extreme template programming, of course. ;)
Oh, and std::deque is, I believe, random access.