Subj : Re: Warning question To : borland.public.cpp.borlandcpp From : Danzer Date : Fri Feb 04 2005 09:40 am dkat wrote: > //why do I get this warning- > > //[C++ Warning] GlazeFormulation.cpp(812): W8004 'd' is assigned a value > that is never used > > //On this code > > > AnsiString TMainForm::CheckString(AnsiString String) > { > AnsiString TempString; > int d = 0; [snip code] > d=0; > for( int s=0;s<=TempString.Length();++s) > if(cp[s] < '0' || cp[s] > '9') > {TempString.Delete(s+1-d,1); ++d; } > if(cp)delete cp; > return TempString; > } > > Both assigments to d are not needed. .