Possible permutations of strings.

I am trying to solve a c++ problem in which at a point I need to find all the possible permutations of strings entered by the user. For example, the possible permutations of the strings "Hello" and "World" will be "HelloWorld" and "WorldHello". I am unable to figure out how to solve this problem. Can someone please tell me how can I accomplish this? What logic should be applied here and what functions will be useful?
what functions will be useful?
std::next_permutation maybe?
http://en.cppreference.com/w/cpp/algorithm/next_permutation
Topic archived. No new replies allowed.