A class can define what +, == or < mean for its objects by writing functions named operator+, operator== and so on. A Price stored in whole cents can then be added and compared like a number, while the type stops anyone mixing a price with a plain quantity by accident.
Operators that combine two values are usually free functions taking both by value or const reference and returning a new object: Price operator+(Price a, Price b). Comparison operators return bool. In C++20, auto operator<=>(const Price&) const = default; can generate all the comparisons at once from the members.
To print an object with std::cout << p, write std::ostream& operator<<(std::ostream& out, const Price& p), which writes to out and returns it so that calls chain. Overload only where the meaning is obvious: + on prices adds them.
Free functions that add and compare two prices.