mpz_powm_sec confusion
Zachary Jensen
zjensen09 at yahoo.com
Sun May 28 22:10:18 UTC 2017
Hi,
I'm new to c++, but as a side project apart from my c++ course at school, I'm trying to create a function that calculates a number using mpz_powm_sec. The calculation works fine, and I can output the mpz_t rop with cout. For example:
mpz_t a;mpz_init(a); //This is my rop.
mpz_t b;mpz_init_set_ui(b, 12);
......
mpz_powm_sec(a, b, ..., ...);cout << a;
I can't, however, store the answer in an int or long variable. I get the error "invalid conversion from 'mpz_struct*' to 'int'. [fpermissive]". For example:
......
mpz_powm_sec(a, b, ..., ...);var = a;
I've tried so many things using the manual as a guide, but to no avail. I would sure be appreciative if you could explain to me how this is done (if it's even possible). Thanks!
-Zach
More information about the gmp-discuss
mailing list