I am writing a code in c++ unix environment using gmp for impelementing quadratic sieve
I have many global variables i.e the number to be factorised and some arrays, sievelength,factorbase siz etc. During the first part of the program, the program simply calculates the factor base implemented through a fucntion compute factor base(), which currently is in my main() program. I want to move the function definition to another file and only call the function in main() , is there any way other than explicitly passing all the variables to the function???