C++ 在c+中查找函数字符串+;

C++ 在c+中查找函数字符串+;,c++,string,C++,String,如果我想搜索str1中第一个出现的字母。若我的str包括字母、数字和符号,但首先我只想搜索字母的位置,如“a”、“b”、“c”、“d”。。。 我可以创建一个字符串arr吗 string str[]={"a","b","c","d","e"....}; str1="signal a: a<= '0';"; str1.find(str,0); stringstr[]={“a”、“b”、“c”、“d”、“e…”; str1=“信号a:a当未找到匹配项时,函数返回string::nposHow?

如果我想搜索str1中第一个出现的字母。若我的str包括字母、数字和符号,但首先我只想搜索字母的位置,如“a”、“b”、“c”、“d”。。。 我可以创建一个字符串arr吗

string str[]={"a","b","c","d","e"....};
str1="signal a: a<= '0';";
str1.find(str,0);
stringstr[]={“a”、“b”、“c”、“d”、“e…”;
str1=“信号a:a当未找到匹配项时,函数返回
string::npos
How?字符串中的“qwertyuiopasdfghjklzxcvnm”有“s”,这也是“信号”的第一个元素。
str.find(“qwertyuiopasdfghjklzxcvnm”,0)
将搜索完整序列“qwertyuiopasdfghjklzxcvnm”“inside
str
从位置0开始。因此,如果我想搜索每个“a”、“b”…我需要使用一个使用find的数组?我可以使用str.find(arr,0)吗?你在找哪个搜索“a”,“b”,“c”?当未找到匹配项时,函数返回
string::npos
How?字符串中的“qwertyuiopasdfghjklzxcvnm”有“s”,它也是“信号”的第一个元素。find(“qwertyuiopasdfghjklzxcvnm”,0)
将搜索
str中的完整序列“qwertyuiopasdfghjklzxcvnm”,从位置0开始。所以如果我想搜索每个“a”,“b”…我需要使用find的数组?我可以使用str.find(arr,0)吗?你在找哪个搜索“a”,“b”,“c”?
string str="signal a";
cout<<str.size()<<endl;