On 2/15/07, Tommy <[EMAIL PROTECTED]> wrote:

> list:
>    int j=15;
>    for(i=0;i<15;i++)
>     {
>      2ndarray[j]=1starray[i];//copy value of 1star to 2ndar
>      j--;//increment j
>     }
>
> note:
>  the value of 2ndarray[0]=0; cause value of 1starray[15]=0;

You'll get a software crash here... 2ndarray[15] does not exist, you
are writing past the end of array (buffer overflow)... this is the
classic fencepost error. The arrays here go from 0..14.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to