length

#include<iostream>
#include<sstream>
using namespace std;
int main()
{
string a;
cout<<"请输入字符串:";
cin>>a;
const string& b=a;
cout<<"字符串的长度为:"<<b.length();
cout<<endl;
return 1;
}

posted @ 2013-05-13 13:28  herizai  阅读(172)  评论(0编辑  收藏  举报