string.back()、string.pop_back()妙用
#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
string str;
while(cin >> str)
{
if(str.back() == '.') str.pop_back();
cout << str.size() << ' ' ;
}
return 0;
}
标签:string,back,pop,单词,str,include,AcWing3293,统计
From: https://www.cnblogs.com/rdisheng/p/16585185.html