While i m using gmp.h header file. i need a fuction which takes inputs of type mpz_t and return mpz_t type too. I m very beginner of using gmp.h So, Here is snaps follows of my approached code....
mpz_t sum_upto(mpz_t max)
{
mpz_t sum;
mpz_init(sum);
mpz_init(result);
for(int i=0;i<=max-1;i++)
mpz_add_ui(sum,sum,pow(2,i));
return sum;
}
but it will show error
1 ." pow has been not used in this scope.",although i have added math.h in very beginnig of the file.
2 . sum_upto declared as function returning an array...
do tell as soon as possible. i have to complete my very big project....