|
// combi.cpp : Defines the entry point for the console application.
//
#include "combinatorial.h"
#include <iterator>
int main(int argc, char* argv[])
{
ComboVector cv;
if (argc != 4)
return -1;
int size = atoi(argv[1]);
int len = atoi(argv[2]);
int combin = atoi(argv[3]);
if (len >= size)
{
cerr << " len cannot be >= size, exiting";
return -2;
}
Comb::Combinations(size,len,combin,cv);
copy(cv.begin(),cv.end(), ostream_iterator<string>(cout, "\n" ) );
return 0;
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.