Thursday, November 25, 2010

Remove() Algorithm

If you have a list of 5 integers, whose values are all 8, and you call the remove function from the <list> header file, and in that call you specify that

you want all elements with the value of 8 removed. The value returned by the list's size() member function will be 0.

Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library by Scott Meyers. Addison-Wesley, 2001.
C++ Templates by David Vandevoorde and Nicolai M. Josuttis. Addison-Wesley, 2003

No comments:

Post a Comment