Search code examples
cgmp

Arrays(initialization) in gmp


How could one initialize and set an array at the same time? I'm looking for something equivalent to this:

int mat[2][2]={{1,1},{1,0}};

in mpz_t. Cheers.


Solution

  • mpz_t is more or less opaque to you, and it requires function calls to initialize.

    So you can't initialize it with a C initializer.