Driver code
int main ( ) { int arr [ ] = { 0 , 1 , 2 } ; AllPermutation < int > perm ( arr , sizeof ( arr ) / sizeof ( int ) ) ; perm . GetFirst ( ) ; while ( perm . HasNext ( ) ) { perm . GetNext ( ) ; } return 0 ; }