For this Question: Given two strings A and B, check if the string A is a sub-string of string B or not.First line of input contains a string A, the second line of the input contains the string B.

Constraints:-
1 < = |A| < = |B| < = 1000

Note:- String will only contain lowercase english letters.Print "Yes" if the string A is the substring of string B, else print "No".Sample Input:-
ewt
newton

Sample Output:-
Yes

Sample Input:-
erf
sdafa

Sample Output:-
No, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;

// Returns true if s1 is substring of s2
int isSubstring(string s1, string s2)
{
    int M = s1.length();
    int N = s2.length();

    /* A loop to slide pat[] one by one */
    for (int i = 0; i <= N - M; i++) {
        int j;

        /* For current index i, check for
 pattern match */
        for (j = 0; j < M; j++)
            if (s2[i + j] != s1[j])
                break;

        if (j == M)
            return i;
    }

    return -1;
}

/* Driver program to test above function */
int main()
{
    string s1;
    string s2 ;
    cin>>s1>>s2;
    int res = isSubstring(s1, s2);
    if (res == -1)
        cout << "No";
    else
        cout <<"Yes";
    return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?