Just ran the program as is and the function worked was called just fine
Your function was called (try strings of different length) but your method won't work, particularly if there are repeated letters.
I should sort the two strings (use std::sort()) and then compare for equality.
You might want to deal with the upper-case/lower-case issue as well.
Last edited on