Vance
- 180
- 0
Here is the code...
Can you tell me how I can push_back each permutated set into a vector or list or anything ?
I would like to use each of them then...
Do you have any ideas or instructions ?
(Edit) I am sorry, I change int array into char one and my first question should be how to make a string from chars above, I would first change them into "miso"- a string rather than just a char-array
Thanks
Nn
PHP:
int main(){
char a[]={'m','i','s','o'};
do{
std::copy(a,a+4,std::ostream_iterator<int>(std::cout, " "));
std::cout<<std::endl;
}while(std::next_permutation(a,a+4));
return 1234567890;
}
Can you tell me how I can push_back each permutated set into a vector or list or anything ?
I would like to use each of them then...
Do you have any ideas or instructions ?
(Edit) I am sorry, I change int array into char one and my first question should be how to make a string from chars above, I would first change them into "miso"- a string rather than just a char-array
Thanks
Nn
Last edited: