Home Segments Index Top Previous Next

264: Mainline

Functions that return values representing true or false are called predicates. C++ offers several predicates that test the relationship between pairs of numbers:

Predicate Purpose\
== Are two numbers equal?\ != Are two numbers not equal?\ > Is the first number greater than the second?\ < Is the first number less than the second?\ >= Is the first number greater than or equal to the second?\ <= Is the first number less than or equal to the second?\