[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (no subject)
From: |
Kevin Ryde |
Subject: |
Re: (no subject) |
Date: |
Tue, 03 Dec 2002 06:31:12 +1000 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (i386-debian-linux-gnu) |
"Jean-Christian Anglès d'Auriac" <address@hidden> writes:
>
> aux = (mpz_class *)malloc(1*sizeof(mpz_class ));
> if (aux==0)
> exit(0);
>
> Z = 122;
> aux[0] = Z;
I believe this is invalid. When you just use malloc the mpz_class
constructor is not run for aux[0].
I'm pretty sure you want to use "new", though I don't pretend to be a
c++ expert and I forget the exact syntax for an array "new".