【摘抄】A Conclusion Of Choosing Among Erasing Options
2007-8-29 Nie.Meining Coding
To eliminate all objects in a container that have a particular value:
If the container is a vector, string, or deque, use the erase-remove idiom.
If the container is a list, use list::remove.
If the container is a standard associative container, use its erase member function.
To eliminate all objects in a container that satisfy a particular predicate:
If the container is a vector, string, or deque, use the erase-remove_if idiom.
If the container is a list, use list::remove_if.
If the container is a standard associative container, use remove_copy_if and swap, or write a loop to walk the container elements, being sure to postincrement your iterator when you pass it to erase.
链接
分类
最新日志
最新评论
- Stanislavaknoca
nea personal loan ... - travelleral
Бронирование гостини... - CharlesMeats
The best girls for s... - Aarontic
http://zithromax.com... - Aarontic
http://furosemide.te... - Stanislavaknoca
cash loans bend oreg... - cialis online
Impossibility: a wor... - Stanislavaknoca
top payday loan comp... - Stanislavaknoca
payday loans in sapu... - generic cialis
Understanding is a t...
存档
- 2017年5月(1)
- 2017年4月(1)
- 2017年3月(1)
- 2015年3月(1)
- 2014年11月(2)
- 2014年10月(2)
- 2014年8月(1)
- 2014年2月(2)
- 2014年1月(6)
- 2013年12月(15)
- 2012年11月(2)
- 2012年6月(1)
- 2012年3月(1)
- 2012年2月(3)
- 2011年12月(1)
- 2011年11月(1)
- 2011年5月(5)
- 2010年12月(1)
- 2010年11月(3)
- 2010年9月(3)
- 2010年8月(2)
- 2010年4月(1)
- 2010年3月(2)
- 2010年1月(1)
- 2009年12月(8)
- 2009年11月(2)
- 2009年10月(1)
- 2009年9月(1)
- 2009年8月(9)
- 2009年3月(3)
- 2008年7月(2)
- 2008年6月(1)
- 2008年5月(1)
- 2008年4月(5)
- 2008年2月(1)
- 2007年12月(2)
- 2007年11月(1)
- 2007年8月(1)
- 2007年7月(1)