65,211
社区成员
发帖
与我相关
我的任务
分享int main()
{
string s = "D:\\Web\\Image\\g.page.login.v32.empty.gif";
int location= s.find_last_of(".");
string temp = string(s,0,location);
location = temp.find_last_of(".");
string::iterator start = s.begin() + location;
for(; start != s.end();start++)
{
if('0' < *start && *start < '9')
{
s.erase(start);
start--;
}
}
cout<< s <<endl;
return 0;
}