Subj : Re: Terrible trouble To : borland.public.cpp.borlandcpp From : waking@idirect.com (Wayne A. King) Date : Tue Jul 08 2003 05:19 am On Mon, 7 Jul 2003 17:56:54 +0200, "b" wrote: >so what is the difference from ++r and r++? Pre-increment vs. post-increment. The effect of this difference depends on the context, and the nature of the object being incremented. For a stand-alone operation, there is no difference with POD objects. That is, both ++x; x++; increment variable x by one. >> > for(int r = 0; bla bla; r++) >> > for(int r = 0; bla bla; ++r) Whatever is in the 3rd argument of a for() statement gets executed/evaluated AFTER (at the end of) each iteration of the loop. Therefore, there is no difference in the effect of ++r vs. r++ in this case. -- Wayne A. King (ba994@torfree.net, wayne.king@ablelink.org, waking@idirect.com, Wayne_A_King@compuserve.com) .