A comma operator should have two expressions as operands. On its right hand side, you have int i=0
which looks like a declaration, not an expression.
If you remove that int
, you are declaring a std::vector<std::string>::iterator
variable named i
and assigning or constructing it with 3
which does not type-check.
In practice, move the int i=3;
declaration before (and out of) your for
loop.