not_equal_to |
A binary function object that
returns true if its first operand is not equal to
its second operand.
#include <functional>
template< class T >
struct not_equal_to : binary_function< T, T, bool >
!= y .
#include <algorithm>
#include <functional>
int input1[ 4 ] = { 1, 7, 2, 2 };
int input2[ 4 ] = { 1, 6, 2, 3 };
void
main()
{
int output[ 4 ];
transform( input1, input1 + 4, input2, output, not_equal_to< int >() );
for ( int i = 0; i < 4; ++i )
cout << output[ i ] << "\n";
}
0
1
0
1
Copyright©1994-2026 Recursion Software LLC
All Rights Reserved - For use by licensed users only.