C++ 中 substr()函数的使用
string a,b; cin >> a >> b; if(b == a.substr(1,4)) cout << "yes."<< endl; else cout << "No."<<endl; cout << a.substr(1,4)<<endl;