So while I was looking for a solution.I found split().When I try to use it, it says it was not declared.Is it a c++ library
you cannot use s
after you replaced with f
(or you recalculate s).
"marry" has 5 character while "john" only 4.
so move line 4 directly befor line 10