字符串a中找字串b
#include<iostream>
#include<string>
using namespace std;
int main()
{
string a, b;
cin >> a >> b;
cout << a.find(b) + 1 << endl;
system("pause");
return 0;
}
字符串a中找字串b
#include<iostream>
#include<string>
using namespace std;
int main()
{
string a, b;
cin >> a >> b;
cout << a.find(b) + 1 << endl;
system("pause");
return 0;
}