1.常用 str.length() str.size() ,getline(cin,s)
int n=str.find("s",3)从str的第3个位置开始找s,结果为第一次找到s的位置
str2=str.substr(pos,5)(从str的pos位置开始截取长度为5的子串给2)
2.memset(a,0,sizeof(a)) c++中要加<cstring>头文件
1.常用 str.length() str.size() ,getline(cin,s)
int n=str.find("s",3)从str的第3个位置开始找s,结果为第一次找到s的位置
str2=str.substr(pos,5)(从str的pos位置开始截取长度为5的子串给2)
2.memset(a,0,sizeof(a)) c++中要加<cstring>头文件