(Check substrings) Write the following function to check whether string s1 is a substring of string s2. The function returns the first index in s2 if there is a match. Otherwise, return −1.
int indexOf(const string& s1, const string& s2)
Write a test program that reads two strings and checks whether the first string is a substring of the second string. Here is a sample run of the program:


We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.