Is it possible to use std::next_permutation() to permutate the elements of a vector of a class i created?
How does the comparison parameter in next_permutation() wor
Is it possible to use std::next_permutation() to permutate the elements of a vector of a class i created?
Yes!
Try this
#include
#include
#include
int main()
{
typedef std::vector V; //
V v;
for(int i=1;i<=5;++i)
v.push_back(i*10);
do{
std::cout<
How does the comparison parameter in next_permutation() work?
This might help