On Mon, Feb 15, 2010 at 10:11 AM, Tim Wescott <t...@wescottdesign.com> wrote:

> You are extracting individual characters out of rawInput by getting a
> pointer to a character array, then getting characters 'the C way'.
>
> Yet the string class has a character extraction operator -- why not just
> use rawInput[i], or rawInput.at(i)?
>

...or iterator members rawInput.begin() and rawInput.end() to avoid using
size() at all?
modified example from the string RefMan entry:
string::iterator it;
for  (it = rawInput.begin(); it < rawInput.end(); it++) {
    if (*it == 0x2e) {
         etc, etc, etc
    }

- tony
_______________________________________________
PLUG mailing list
PLUG@lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to