C++ not Keyword
Example
The not keyword gives the same result as the ! operator:
int x = 5;
int y = 3;
cout << !(x < y) << "\n";
cout << not (x < y);
Definition and Usage
The not keyword is another way to write the logical ! (not) operator. It reverses a result: true becomes false, and false becomes true. In the example above, x < y is false, so not (x < y) is true (1).
Both ways work the same, but ! is much more common.
Related Pages
Read more about logical operators in our C++ Logical Operators Tutorial.