Check if a vector is empty in C++
In this article, we will discuss different ways to check if a vector is empty or not in C++. Table Of Contents Method 1: using vector::empty() Method 2: using vector::size() Method 3: using vector::begin() & vector::end() Summary Method 1: using vector::empty() In C++. the vector class provides a function empty(). It returns true if the […]
Check if a vector is empty in C++ Read More »