如何求string的长度
#include <iostream>
using namespace std;
int main() {
string s("aaaaaaaab");
int length1 = s.length();
int length2 = s.size();
int length3 = strlen(s.c_str());
cout<<length1<<' '<<length2<<' '<<length3<<endl;
return 0;
}