Question: Given the class definition below, write a member function that checks if two strings (as defined below) are equal. Give PRE and POST conditions for
Given the class definition below, write a member function that checks if two strings (as defined below) are equal. Give PRE and POST conditions for the operator== you write. class String { public: string() { s[0] = 0; }; bool operator==(const String&) const; private: char s[256]; //null terminated character array };
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
