//: C12:Strings1.cpp // From Thinking in C++, 2nd Edition // Available at http://www.BruceEckel.com // (c) Bruce Eckel 2000 // Copyright notice in Copyright.txt // No auto type conversion #include "../require.h" #include #include #include using namespace std; class Stringc { string s; public: Stringc(const string& str = "") : s(str) {} int strcmp(const Stringc& S) const { return ::strcmp(s.c_str(), S.s.c_str()); } // ... etc., for every function in string.h }; int main() { Stringc s1("hello"), s2("there"); s1.strcmp(s2); } ///:~