Aracılığıyla paylaş


set::empty

Bir dizi boşsa sınar.

bool empty( ) const;

Dönüş Değeri

gerçek set boşsa; yanlış kümesi boş olmayan ise.

Örnek

// set_empty.cpp
// compile with: /EHsc
#include <set>
#include <iostream>

int main( )
{
   using namespace std;
   set <int> s1, s2;
   s1.insert ( 1 );

   if ( s1.empty( ) )
      cout << "The set s1 is empty." << endl;
   else
      cout << "The set s1 is not empty." << endl;

   if ( s2.empty( ) )
      cout << "The set s2 is empty." << endl;
   else
      cout << "The set s2 is not empty." << endl;
}
  
  

Gereksinimler

Başlık: <set>

Namespace: std

Ayrıca bkz.

Başvuru

set Class

set::empty ve set::clear

Standart Şablon Kütüphanesi