C++ - Comparison Operators
Overview
Estimated time: 15–25 minutes
Compare values for equality and ordering using comparison operators.
Learning Objectives
- Use == != < > <= >= with numbers and compare strings.
Examples
int a=3,b=4; bool eq = (a==b);
std::string s="a", t="b"; bool lt = (s < t);