string的话可以用find函数
#include
#include
using namespace std;
int main()
{
string s="golden global view";
string r="new";
if (s.find(r) < s.length())
{
cout<<"s中包含r"<
else
{
cout<<"s中不包含r"<
return 0;
}
具体怎么规定?B在A中是连续的吗?比如:A=“abcdef”,B=“acdef”,这种算不算?