#include <iostream>
#include <algorithm>
#include "string"
#include "vector"
#include "stack"
using namespace std;
int strStr(string haystack, string needle)
{
if (haystack.size() < needle.size()) return -1;
if (haystack == "") return 0;
for (int i = 0; i <= haystack.size() - needle.size(); i++)
{
string temp = haystack.substr(i, needle.size());
if (temp == needle)
{
return i;
}
}
return -1;
}
int main()
{
cout << strStr("", "a") << endl;
system("pause");
return 0;
}