C++ not_eq Keyword
Example
The not_eq keyword gives the same result as the != operator:
int x = 5;
int y = 3;
cout << (x != y) << "\n";
cout << (x not_eq y);
Definition and Usage
The not_eq keyword is another way to write the != (not equal) comparison operator. It returns true (1) if two values are not equal, and false (0) if they are equal.
Both ways work the same, but != is much more common.
Related Pages
Read more about comparison operators in our C++ Comparison Operators Tutorial.