hello,

I am using a static library(NTL), and it has a function I need to use, problem is it accepts inputs by cin, while I need to pass it by command line arguments.

here is the code

#include <NTL/ZZXFactoring.h>

NTL_CLIENT

int main()
{
ZZX f;

cin >> f;

vec_pair_ZZX_long factors;
ZZ c;

factor(c, factors, f);

cout << c << "\n";
cout << factors << "\n";
}

as it can be seen, it takes f as an istream object (and f should be inputted as: [9 10 3] )
but I want to pass f with command line arguments. like: executable [9 10 3] )
int main(int argc, char *argv[])
{
ZZX f ;
int *temp;
int k [argc];
temp=k;
for(int i=1; i<argc;i++)
{
f=atoi(argv[i]);
*temp=atoi(argv[i]);
temp++;
}
//f =atoi(argv[1]);

vec_pair_ZZX_long factors;
ZZ c;
factor(c, factors, f);
cout << c << "\n";
cout << factors << "\n";
}

How can I do that without changing library quickest way?