<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi everybody.</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm experiencing a problem with dynamic allocation
of mpz_t arrays.</FONT></DIV>
<DIV><FONT face=Arial size=2>I write code like following:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>#include "gmp.h"</FONT></DIV>
<DIV><FONT face=Arial size=2>typedef
struct{<BR> mpz_t
*FacBase;<BR> int
FacBaseSize;
<BR>}FattoreBase;</FONT></DIV>
<DIV><FONT face=Arial size=2>int main (void){</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
FattoreBase
FactorBase; <BR> int FactorBase.FacBaseSize=255;
//it could change...</FONT><FONT face=Arial
size=2><BR> mpz_array_init(FactorBase.FacBase,
FactorBase.FacBaseSize, 32);</FONT></DIV>
<DIV><FONT face=Arial size=2> return 0;</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>At compile time, compiler stops with the following
error message:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>main.cpp cannot convert `__mpz_struct (*)[1]' to
`__mpz_struct*' for argument `1' to `void __gmpz_array_init(__mpz_struct*,
mp_size_t, mp_size_t)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I really can't understand what's the
problem.</FONT></DIV>
<DIV><FONT face=Arial size=2>Could anyone help me?</FONT></DIV>
<DIV><FONT face=Arial size=2>Thank you,</FONT></DIV>
<DIV><FONT face=Arial size=2>Alessio</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>P.S.: I'm developing on Windows Xp Pro,
Including lib-gmp3.a (generated by building GMP with Mingw and Msys).
Development environment Dev C++.</FONT> </DIV></BODY></HTML>