Subj : Win98 error To : borland.public.cpp.borlandcpp From : Les Hurley Date : Thu Mar 11 2004 04:40 pm 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. #include struct StatsX{ double Prob, Rate, ExpRate, Var, SD, CV;}Stats ; int main(){ const int nmax=100; double Prob=0., Rate=0., P[nmax], R[nmax]; int n=0,i; while(n<=(nmax-1)) { cout<<"Enter Prob, Rate : "; cin>>Prob>>Rate ; P[n]=Prob; R[n]= Rate; ++n; if(Prob<=1.) continue; else break; } n-=2; for(i=0; i<=n; i++) {Stats.ExpRate+=P[i]*R[i]; } cout<<"Expected rate = : "<