Unary Overloaded Operators as Non-Member Functions

A unary operator such as ! may be overloaded as a non-member function with one parameter. If s is a String class object (or a reference to a String class object), then !s is treated as if the call operator!(s) had been written, invoking the non-member operator! function that’s declared as follows:

bool operator!( const String & );

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset