0

String Permutation

Free lines C/C++ 1 revisions 131 7 months ago 7 months ago
#include <iostream>
#include <string>
#include <algorithm>
 
using namespace std;
 
int main()
{
    string GG = "Thats.GG";

    while(next_permutation(GG.begin(), GG.end())) { cout << GG << endl; }
    return 0;
}

For when you need every possible combination.