From: | Jack York |
Date: | 18 Aug 2000 at 03:48:29 |
Subject: | Re: Passing a ptr |
Hello Allan
On 17-Aug-00, Allan Odgaard wrote:
> On 17-Aug-00, Jack York wrote:
>
>> if ( ! *((array[i]) = (mystruct *) AllocVec (sizeof
>> (mystruct)))
> ^ - this seems to be wrong...
>
> What you do is check if the first field of the allocated chunk is
> non-null.
I'm not sure I understand this Allan for a couple of reasons. Are
you saying that if I end up with an array of 10 structs that I should
only check if array[0] was allocated? But first, just to be sure
we are talking about the same thing, I am talking about
accomplishing this by calling a funtion as
MakeArray ( struct mystruct ***array...
so wouldn't the variable array[i] in that funtion have to be
written as *(array[i]) or something like that?
Jack