Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

operator>= (<vector>)

Tests if the object on the left side of the operator is greater than or equal to the object on the right side.

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

_Left

An object of type vector.

_Right

An object of type vector.

true if the vector on the left side of the operator is greater than or equal to the vector on the right side of the vector; otherwise 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 v1 is greater than or equal to vector v2.

Header: <vector>

Namespace: std

Show:
© 2015 Microsoft