Subj : Re: Win98 error To : borland.public.cpp.borlandcpp From : Bob Gonder Date : Thu Mar 11 2004 06:20 pm Les Hurley wrote: >Here is a little program extract that seems to run perfectly right up >until I hit the exit or close button. At that point win 98 tells me >that my program has performed an illegal operation. >I'm using BC5.02 and EasyWin. Can anyone spot the trouble? Thanks. I would use #define nmax 100 > const int nmax=100; > double Prob=0., Rate=0., P[nmax], R[nmax]; > {Stats.ExpRate+=P[i]*R[i]; } You never initialize stats. It's value is unknown. .