#include<iostream>
#include<string>
using namespace std;
int main() {
string s;
cin >> s;
const char * p = s.c_str();
int len = 0;
while (*p++)
len++;
cout << "the length of string :" << len << endl;
system("pause");
return 0;
}
计算字符串的长度
猜你喜欢
转载自blog.csdn.net/CoderMaximum/article/details/86031072
今日推荐
周排行