All variables in my program use the following datatype
typedef long long ll;
I installed GMP and tried to do this:
typedef mpz_class ll;
and I tried
typedef mpz_t ll;
But it won't compile, usually with tons of "invalid operator" errors. Is there any easier way to translate things over?
Example error:
ll a = sqrt(static_cast<double>(n/2));
invalid static_cast from type __gmp_expr<__mpz_struct[1], __gmp_binary_expr<mpz_class, long int, __gmp_binary_divides> >' to type
double'
another one:
count-=myArr[m];
no match for 'operator[]' in 'myArr[m]'
it also won't let me do
mpz_t count;
count = (x*x-1);
where x is a long long