list::empty
Liste boşsa sınar.
bool empty( ) const;
Dönüş Değeri
gerçek listesi boşsa; yanlış liste boş değilse.
Örnek
// list_empty.cpp
// compile with: /EHsc
#include <list>
#include <iostream>
int main( )
{
using namespace std;
list <int> c1;
c1.push_back( 10 );
if ( c1.empty( ) )
cout << "The list is empty." << endl;
else
cout << "The list is not empty." << endl;
}
Gereksinimler
Başlık: <list>
Namespace: std