String window---------not getting the right output
@guptarahul3100
there are few mistakes in your code. I am pointing out them, plz correct them
- line no 8 should be int pl = ptr.size() ;
- If substring doesn’t exist, then you have to print “No String” not “No window”. So change line no 10 and 43 to return “No String” ;
- input string have space between them. So cin>>str>>ptr; wouldn’t work here. Change line 50 to getline(cin,str); getline(cin,pat);
@guptarahul3100
As I can see you got 100 points for this question. pLease mark this doubt as resolved.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.