这串分隔字符的代码有错吗:
getline(cin,n);
len=n.length()-1;
string temps_to_n_44_temp;
cout<<n.length()<<endl;
int sp=9;
for(int i=0;i<=len;i+=sp)
{
if(i+sp>len)
{
string temps;
temps=n.substr(i,len-i);
temps_to_n_44_temp+=temps;
break;
}
else
{
string temps;
temps=n.substr(i,sp);
temps_to_n_44_temp+=temps;
cout<<temps_to_n_44_temp<<endl;
}
}
n=temps_to_n_44_temp;
cout<<n;