std::string f; f.append(0,2); f[0]=2; f[1]=1; //f="cd"; std::string s; s.append(0,5); s[0]=1; s[1]=2; s[2]=1; s[3]=3; s[4]=1; //s="abcde"; unsigned int pp=0; pp=s.find(f);
std::string f; //f.append(0,2); //f[0]=2; //f[1]=1; f="cd"; std::string s; //s.append(0,5); //s[0]=1; //s[1]=2; //s[2]=1; //s[3]=3; //s[4]=1; s="abcde"; unsigned int pp=0; pp=s.find(f);
s.append(0,5) //wrong s.append(5,0) //right
f[0] = 'c'; f[1] = 'd';
f[0] = 'a' + 2; f[1] = 'a' + 3;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)