SyntaxFix
Write A Post
Hire A Developer
Questions
vector.clear() should work for you. In case you want to shrink the capacity of the vector along with clear then
vector.clear()
vector
std::vector<T>(v).swap(v);