Code aint working
use simple cin, instead of cin.get()
Corrected Code
what was the problem with cin.getline?i used ’ ’ as a terminator so that shouldnt have been a problem
the problem with cin.getline was that, you were using ’ ’ as delimiter for both s1 and s2, but it should be delimiter for only s1.
Corrected code
yeah got my blunder! thanks
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.