deque::empty
Tests if a deque is empty.
bool empty( ) const;
Return Value
true if the deque is empty; false if the deque is not empty.
Example
// deque_empty.cpp
// compile with: /EHsc
#include <deque>
#include <iostream>
int main( )
{
using namespace std;
deque <int> c1;
c1.push_back( 10 );
if ( c1.empty( ) )
cout << "The deque is empty." << endl;
else
cout << "The deque is not empty." << endl;
}
Output
The deque is not empty.
Requirements
Header: <deque>
Namespace: std