Dynamically create an array of mpz_t's

Kevin Ryde user42@zip.com.au
Mon, 11 Aug 2003 11:17:31 +1000


"Sisyphus" <kalinabears@iinet.net.au> writes:
>
> ie what declaration is made,

mpz_t *a;

> and what do the malloc() and free() calls look like ?

a = malloc (count * sizeof(mpz_t));

Ie. mpz_t is like other types in this respect.

> Can it be done (by someone who has only just now learnt how to dynamically
> create a 2D array) ?

Beginning C questions are off-topic here, but the way mpz_t is
declared makes it not quite obvious how it should work.