string s;
cin>>s;
if(cin.eof()) cout < <"is EOF" < <endl;
else cout < <" is not EOF" < <endl;
cout < <"s.length=" < <s.length() < <endl;
for(int i=0;i <s.length();++i) cout < <i < <":" < <s[i] < <' ';
cin.eof()
最新推荐文章于 2022-03-03 10:16:34 发布
string s;
cin>>s;
if(cin.eof()) cout < <"is EOF" < <endl;
else cout < <" is not EOF" < <endl;
cout < <"s.length=" < <s.length() < <endl;
for(int i=0;i <s.length();++i) cout < <i < <":" < <s[i] < <' ';