|
From: philip m. <mor...@ho...> - 2003-04-07 20:38:13
|
try: vector.size() - 1 hope this helps Philip Mortimer www: http://mysite.freeserve.com/coniferway/ ----- Original Message ----- From: "David McKen" <ci...@ya...> To: "Dev-C Mailing List" <dev...@li...> Sent: Monday, April 07, 2003 7:49 PM Subject: [Dev-C++] STL Vector > This may sound really stupid but here goes. > > I have a vector of objects (STL vector, just an arbritary > class). I have just pushed an object onto the end of this > vector. I want the index (the number I put in [] to access > the object) of the object I pushed onto the back. How would > I do so? (vector.size()?, or .end()) > > ===== > Signed > David Mcken > > Life Sucks > Live with it > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - File online, calculators, forms, and more > http://tax.yahoo.com > > > ------------------------------------------------------- > This SF.net email is sponsored by: ValueWeb: > Dedicated Hosting for just $79/mo with 500 GB of bandwidth! > No other company gives more support or power for your dedicated server > http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |