The program declares four string
s (lines 8–11) and outputs each (lines 13–14). Line 17 tests string1
against string4
for equality using the overloaded equality operator. If the condition is true
, "string1 == string4"
is output. If the condition is false
, the condition in line 20 is tested. All the string
class overloaded relational and equality operator ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.