#include #include #inlcude int main() { std::string s = "Hallo"; // niedrigste Permutation std::prev_permutation(begin(s), end(s)); // hoechste Permutation do { std::cout << s << '\n'; // absteigend ausgeben } while (std::prev_permutation(begin(s), end(s))); }