Aracılığıyla paylaş


operator!= (<queue>)

Sınamaları işlecinin sol tarafındaki sıra nesnesinin sağ tarafındaki sıra nesnesi için eşit değildir.

bool operator!=(
   const queue <Type, Container>& _Left,
   const queue <Type, Container>& _Right,
);

Parametreler

  • _Left
    Bir nesne türü sıra.

  • _Right
    Bir nesne türü sıra.

Dönüş Değeri

gerçek yoksa sıraları eşit; yanlış sıralar eşitse.

Notlar

Sıra nesneleri arasında karşılaştırma öðelerinin yapılandırdı Karşılaştırmasında esas alır.Bunlar aynı sayıda öğe varsa ve bunların ilgili öğeleri aynı değerlere sahip iki sıra eşit.Aksi halde, bunlar eşit olmayan.

Örnek

// queue_op_ne.cpp
// compile with: /EHsc
#include <queue>
#include <list>
#include <iostream>

int main( )
{
   using namespace std;

   // Declares queues with list base containers
   queue <int, list<int> > q1, q2, q3;

   // The following line would have caused an error because vector 
   // does not support pop_front( ) and so cannot be adapted
   // by queue as a base container
   // queue <int, vector<int> > q1, q2, q3;

   q1.push( 1 );
   q2.push( 1 );
   q2.push( 2 );
   q3.push( 1 );

   if ( q1 != q2 )
      cout << "The queues q1 and q2 are not equal." << endl;
   else
      cout << "The queues q1 and q2 are equal." << endl;


   if ( q1 != q3 )
      cout << "The queues q1 and q3 are not equal." << endl;
   else
      cout << "The queues q1 and q3 are equal." << endl;
}
  
  

Gereksinimler

Başlık: <queue>

Namespace: std

Ayrıca bkz.

Başvuru

Standart Şablon Kütüphanesi