// // test length() member function. // // assumes constructors work. // #include #include // has EXIT_SUCCESS #include "lstring.h" #include "testsub.h" // has functions for testing int main(void) { lstring empty; lstring x('x'); lstring wxyz("wxyz"); cout << "length of '' = " << empty.length() << endl; cout << "length of 'x' = " << x.length() << endl; cout << "length of 'wxyz' = " << wxyz.length() << endl; // compile-time check to see if return type is correct. lstring::length_pos l = empty.length(); cout << "length of '' again = " << l << endl; cout << "That's all, folks!\n"; return EXIT_SUCCESS; }