multiset::empty
Zkoušky, pokud multimnožina je prázdný.
bool empty( ) const;
Vrácená hodnota
true Pokud multimnožina je prázdná. false je-li multimnožina neprázdné.
Příklad
// multiset_empty.cpp
// compile with: /EHsc
#include <set>
#include <iostream>
int main( )
{
using namespace std;
multiset <int> ms1, ms2;
ms1.insert ( 1 );
if ( ms1.empty( ) )
cout << "The multiset ms1 is empty." << endl;
else
cout << "The multiset ms1 is not empty." << endl;
if ( ms2.empty( ) )
cout << "The multiset ms2 is empty." << endl;
else
cout << "The multiset ms2 is not empty." << endl;
}
Požadavky
Hlavička: <set>
Obor názvů: std