#include <string.h>#include <algorithm>#include <conio.h>#include <iostream.h>int main(int argc, char* argv[]){ int i=0; char* strings=new char[200]; strings="bcdse"; int numStrings=strlen(strings); std::sort(&strings[0], &strings[numStrings]); do { cout<<strings; cout<<endl; i++; } while ( std::next_permutation (&strings[0], &strings[numStrings])); cout<<i; getch(); return 0;}
template<class RandomAccessIterator> void sort( RandomAccessIterator _First, RandomAccessIterator _Last );
delete [] strings;
std::sort(&strings[0], &strings[numStrings]);