[Effective-cpp] Item 1: Uses and Abuses of vector

Gregory Haley ghaley at venaca.com
Wed Oct 27 11:22:11 EDT 2004


OOPS!!!  I meant to write "I would NOT use . . ."  sorry about that.

> On another point raised, I would use this sort of loop for a 
> vector that I intend to modify, especially if the 
> modification involved removing items.  I learned this the 
> difficult way, once trying to iterate through a vector to 
> remove elements, and at times, the removal would blow the 
> "end iterator"
> away.  
> 
> ciao!
> greg.
> 
> Gregory Haley
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/2004
>  
> 
> _______________________________________________
> Effective-cpp mailing list
> Effective-cpp at accu.org
> http://www.accu.org/mailman/listinfo/effective-cpp
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/2004
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.779 / Virus Database: 526 - Release Date: 10/19/2004
 




More information about the Effective-cpp mailing list