Re: Modifying through pointer-to-const

From: Walter Tross (walter_at_waltertross.com)
Date: 04/19/04


Date: Mon, 19 Apr 2004 23:23:10 +0200

On Mon, 19 Apr 2004 13:52:29 -0700, "Dave" <better_cs_now@yahoo.com>
wrote:
(snip)
> DynGaRec->MvPeriod[index] = currentEvPt; // ILLEGAL!!!
> DynGapRec->GapInteval[index] = pGap->i_GapEndMt[gapRecCnt]; //
>ILLEGAL!!!

It looks like MyPeriod and GapInterval are pointers, not arrays. In
this case they are const (because of your passing a const DynGap*
DynGapRec), but what they point to is not.