api

vector::erase() function in C++

In this article, we will discuss all about vector’s erase() function, and how to use the vector::erase() function in C++. Table Of Contents Remove single element from vector using erase() Removing multiple elements from vector using erase() function Using vector::erase() function in the for loop Summary In C++, the vector class provides a function erase() […]

vector::erase() function in C++ Read More »

vector::pop_back() function in C++

In C++, the vector class provides a function pop_back(). It removes the last element from the calling vector object. Table Of Contents Syntax of vector::pop_back(): Example of vector::pop_back() function Calling vector::pop_back() function on empty vector Remove all elements from vector using vector::pop_back() Summary Syntax of vector::pop_back(): Parameters: None Return value: None It accepts no argument,

vector::pop_back() function in C++ Read More »

Scroll to Top