Driver Code
int main ( ) { string S = " barfoothefoobarman " ; vector < string > L = { " foo " , " bar " } ; vector < int > indices = findSubstringIndices ( S , L ) ; for ( int i = 0 ; i < indices . size ( ) ; i ++ ) cout << indices [ i ] << " ▁ " ; return 0 ; }