Category: C++

Articles on C++ programming language.

Erasing range of element from C++ List

C++ std::list Clear vs Erase vs Empty Explained

This article explains how one can remove items from standard c++ list using the function clear(), empty() and remove(). It also explains how these functions differ and how one can use them.

Advertisements