#include <string>
#include<iostream>
using namespace std;
int main()
{
string m_hovertree = "hellosss";
int m_length = m_hovertree.length();
int m_positon = m_hovertree.find("he");
cout <<"position:"<< m_positon << endl;
cout << "length:" << m_length << endl;
return 0;
}
执行结果: