Subj : Re: Terrible trouble To : borland.public.cpp.borlandcpp From : "b" Date : Mon Jul 07 2003 06:56 pm ok, so what is the difference from ++r and r++? "Vladimir Grigoriev" ha scritto nel messaggio news:3f098911$1@newsgroups.borland.com... > In each case the value of r == 0 for the first iteration. ( see Peter > message!) > Grigoriev Vladimir. > > b ÐÉÛÅÔ × > ÓÏÏÂÝÅÎÉÉ:3f0977cd@newsgroups.borland.com... > > i don't understand your exemple anyway: > > in for(int r = 0; bla bla; r++) > > { > > at the first loop r how much is? > > } > > > > while > > > > in for(int r = 0; bla bla; ++r) > > { > > and here at the first loop r how much is? > > } > > > > > > > > > > "Peter Strömberg" ha scritto nel messaggio > > news:Xns93B18EC3E16D8wilfriedspamcopnet@207.105.83.65... > > > "b" wrote in > > > news:3f0954c1$1@newsgroups.borland.com: > > > > > > > in this case: > > > > for(int r =0; r<=EditH->GetTextLen() - 1; ++r) // ++r > > > > { > > > > this is the first loop... now r is 0 or 1? > > > > } > > > > > > > > while in this case: > > > > for(int r =0; r<=EditH->GetTextLen() - 1; r++) // r++ > > > > { > > > > this is the first loop... now r is 1? > > > > } > > > > > > for(A;B;C) > > > D; > > > > > > is the same as > > > > > > A; > > > while(B) > > > { > > > D; > > > C; > > > } > > > > > > -- > > > Peter Strömberg > > > C2K2 C2K3 ISCCIV02 > > > > > > .