On Sat, Mar 03, 2007 at 01:03:19PM +0000, Martin Guy wrote: > +// Query: here ".begin" and ".end" are used; elsewhere ".front" and ".back". > +// What's the difference?
.begin() and .end() return *iterators*. .back() and .front() return references to *elements* iterator firstIt = container.begin(); element firstEl = container.front(); assert(*firstIt == firstEl); iterator lastIt = container.rbegin(); // reverse begin element lastEl = container.back(); assert(*lastIt == lastEl); iterator onePastLast = container.end(); // dont dereference *onePastLast !! --strk; _______________________________________________ Gnash-commit mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-commit
