It sounds like you want combinations and not permutations. There is no need to use an STL container. You can try something like this, which I utilized to confirm a k-th to default computation I made with Newton-Girard.
Basically, create a numbering system and iterate over the ordered sets with strictly increasing #'s.
namespace {
void print(int *s, int const & k) {
for (int j=0; j<k; j++)
printf("%i ", s[j]+1);
printf("\n");
}
int diff_sum(int *s, int const & k) {
int sum=0;
for (int j=1; j<k; j++)
sum+=s[j]-s[j-1];
return sum;
}
};
void combination_list(int const & N, int const & k) {
int selection[k], reset[k-1];
selection[0]=N-k;
int i;
for (i=1; i<k; i++)
selection[i]=reset[i-1]=N-k+i;
int count=1;
print(selection, k);
int j;
while (selection[0]+diff_sum(selection, k)>=k) {
for (j=0; j<k; j++) {
if ( diff_sum(&selection[j], k-j)==k-1-j) {
selection[j]-=1;
for (i=j+1; i<k; i++)
selection[i]=reset[i-1];
count++;
print(selection, k);
}
}
}
printf("count = %i\n", count);
}