exponent operator/library function

Michael P. baseball.mjp at gmail.com
Tue Aug 5 06:18:16 PDT 2008


Jarrett Billingsley Wrote:

> "Michael P." <baseball.mjp at gmail.com> wrote in message 
> news:g77tc7$2fkr$1 at digitalmars.com...
> 
> > Unfortunately, those didn't work( because of type issues). So I made my 
> > own integer one. :)
> 
> cast(int)std.math.pow(10, j)
> 
> > Okay, it's function createArray, which is called by memoryTest. Line 114, 
> > 115.
> > The file is attached.
> > Does anyone know I'm getting these array errors?
> 
> int[] memoryList;
> 
> for ( int i = 0; i < lengthOfList; i++ )
> {
>     memoryList[i] = rand() % 10;
>     ...
> 
> Maaaaybe you can see it now.
> 
> Hint: how long is memoryList? 
> 
> 

Oh. I just thought it dynamically allocated memory for each new element.
Anyways, I put memoryList.length = lengthOfList  above the for statement.
Anyways, thanks for the help. :)
-Michael P.


More information about the Digitalmars-d-learn mailing list