Does anyone have some code that takes a string (stl string class), and prints out every single combinations of characters for that string? I'm looking for a brute-form algorithm that takes a string and prints out every possible scrambling for it. I need it for a game I am programming in my free time. Code would be nice, thank you.
Like "cat" would print: