截取substr
//string的操作 #include<iostream> using namespace std; int main() { string a,b; a="abcde"; b=a.substr(1); // b=a.substr(1,2); cout<<a<<endl; cout<<b<<endl; }
string 截取字符串
原文:https://www.cnblogs.com/helloworld2019/p/10396909.html