StringStream

  • + 1 comment

    ss.ignore() ignores the next character (in this case that'd be a comma). It "looks like" doing ++i, since ss goes to the next character. I think it's bad coding style. ignore() is actually a function that takes an optional parameter (that defaults to 1) telling how many characters to ignore. It'd be better to write ss.ignore(1).

    Also, i=0 is useless since i gets assigned right after in the condition section ss>>i.