Boost logo

Boost Users :

Subject: Re: [Boost-users] [Iterators] iterators over char *
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2010-11-01 18:40:56


2010/11/1 Rao, Anant <Anant.Rao_at_[hidden]>:
> Hi,
> I have a ‘char *’. I need to be able to traverse thru the string in both fwd
> and reverse directions.
> Say, I have a string ‘world’. I will start with a fwd iter pointing at ‘w’
> and start traversing. When I reach the letter ‘r’, I might need to start
> traversing in the backward direction i.e., the next char should be ‘o’ and I
> might again need to traverse fwd.

How will You be traversing? Won't operators ++ and -- on a plain
iterator/char* suffice?

Regards
Kris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net