次の方法で共有


operator>= (<vector>)

演算子の左側のオブジェクトが右側のオブジェクト以上でテスト。

bool operator>=(
   const vector<Type, Allocator>& _Left,
   const vector<Type, Allocator>& _Right
);

パラメーター

  • _Left
    **[ベクタ]**型のオブジェクト。

  • _Right
    **[ベクタ]**型のオブジェクト。

戻り値

演算子の左側のベクターが右側の同時実行ベクターとベクター以上でtrue ; それ false

使用例

// vector_op_ge.cpp
// compile with: /EHsc
#include <vector>
#include <iostream>

int main( )
{
   using namespace std; 
   
   vector <int> v1, v2;
   v1.push_back( 1 );
   v1.push_back( 3 );
   v1.push_back( 1 );

     v2.push_back( 1 );
   v2.push_back( 2 );
   v2.push_back( 2 );

   if ( v1 >= v2 )
      cout << "Vector v1 is greater than or equal to vector v2." << endl;
   else
      cout << "Vector v1 is less than vector v2." << endl;
}
  

必要条件

ヘッダー: <vector>

名前空間: std

参照

関連項目

標準テンプレート ライブラリ