hash_multimap::empty
[!NOT]
Bu API artık kullanılmıyor.Alternatif unordered_multimap Class.
Bir hash_multimap boş bulunup bulunmadığını sınar.
bool empty( ) const;
Dönüş Değeri
gerçek hash_multimap boşsa; yanlış hash_multimap boş ise.
Notlar
Visual C++ .NET 2003, üyeleri de <hash_map> ve <hash_set> başlık dosyaları artık std ad alanında bulunan, ancak bunun yerine stdext ad alanına taşınmış.Bkz: ad stdext daha fazla bilgi için.
Örnek
// hash_multimap_empty.cpp
// compile with: /EHsc
#include <hash_map>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multimap <int, int> hm1, hm2;
typedef pair <int, int> Int_Pair;
hm1.insert ( Int_Pair ( 1, 1 ) );
if ( hm1.empty( ) )
cout << "The hash_multimap hm1 is empty." << endl;
else
cout << "The hash_multimap hm1 is not empty." << endl;
if ( hm2.empty( ) )
cout << "The hash_multimap hm2 is empty." << endl;
else
cout << "The hash_multimap hm2 is not empty." << endl;
}
Gereksinimler
Başlık: <hash_map>
Ad alanı: stdext