Alright ive been using SGI's stl site as a reference and have had limited success using vectors and whatnot from the stl. I've run into a problem though.
How do you use a returned iterator from say, a vector. Im not sure what headers to include or anything. If you havnt guessed I've used mostly Java in the past and am used to an iterator class where you can do something like.
while (iterator.value() !=end)
{ object = iterator.next();
}
(in rough pseudo code)
can anyone give me a quick example of how to use an iterator from a vector in c++ and stl?
How do you use a returned iterator from say, a vector. Im not sure what headers to include or anything. If you havnt guessed I've used mostly Java in the past and am used to an iterator class where you can do something like.
while (iterator.value() !=end)
{ object = iterator.next();
}
(in rough pseudo code)
can anyone give me a quick example of how to use an iterator from a vector in c++ and stl?