Hi Guys...

I am trying to write a recursive function that has two inputs, first and second, which both are strings(from ). The function should print all rearrangements of letters in first, followed by second. For example, if first is the string “CAT” and second is the string “MAN”, then the function would print the strings TACMAN, ATCMAN, CTAMAN, TCAMAN, ACTMAN, and CATMAN.

And the stopping case of the function occurs when the length of first has zero characters. There are two string members are useful in the program. The following is the precondition and postcondition of these two string functions.

void string::instert(size_typr position, size_type number_of_copies, char c);
postcondition: The specified number of copies of c have been inserted into the string at the indicated position.

-Existing characters that used to be at or after the given position have been shifted right one spot.

void string::erase(size_type position, size_type n);
postcondition: n characters have been removed from the string, beginning at the specified position.

Any ideas how to do this? Thanks for the help.