Actually, please try this instead, this is more correct:
void ParseString(const string& str, char c, vector<string>& v)
{
string::size\_type i1 = 0;
string::size\_type i2;
loop
{
i2 = str.find(c, i1);
if (i2 == str.npos)
{
v.push\_back(str.substr(i1));
return;
}
v.push\_back(str.substr(i1, i2-i1));
i1 = i2+1;
}
}
Satoshi Nakamoto wrote: