1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
int main()
{
// intialize input sets (in your case by reading from a file)
std::vector<data_set> info = { {10,11,12}, {21,22,23,24,25}, {34,35,36},
{40,41,42,43,44,45,46,47,48,49},
{50,51,52,53,54}, {60,61,62,63}, {71,72},
{80,81,82,83,84,85,86} } ;
enum { NUM_SETS_TO_CREATE = 9 } ; // number of sets to create
// create the sets
std::srand( std::time(0) ) ;
std::vector<data_set> result = create_sets( info, NUM_SETS_TO_CREATE ) ;
// print them out
for( const data_set& d : result )
{
static int cnt = 0 ;
std::cout << ++cnt << ". [ " ;
for( int v : d ) std::cout << v << ' ' ;
std::cout << "]\n" ;
}
}
|