Please resolve the error

giving wrong output.

@shivansh.sm1 your function should return No string when start_index == -1 you are doing opposite and
take your string s2 input with getline(cin,s2) not with cin.
update this and you are good to go.