//--------------------------------------------------------------------------- #include #include #include #pragma hdrstop #include #include #include //--------------------------------------------------------------------------- using namespace std; int main() { const int N = 45, R = 6; int Balls[N]; iota(&Balls[0], &Balls[N], 1); #ifdef __BORLANDC__ randomize(); #else srand(time()); #endif for (int i = 0; i < 5; i++) { random_sample_n(&Balls[0], &Balls[N], ostream_iterator(cout, " "), R); //ptr_fun(random)); cout << endl; } return 0; } //---------------------------------------------------------------------------