string::front
char& front(); const char& front() const;
功能:返回string对象的首个字符,可以改变它的值
#include <string>
#include <iostream>
using namespace std;
int main()
{
string s1("test");
cout << s1.front() << endl;
s1.front() = 'T';
cout << s1 << endl;
string s2;
cout << s2.front() << endl;
}