// // test getElementAt() member function. // // assumes constructors work. // #include #include // has EXIT_SUCCESS #include "lstring.h" #include "testsub.h" // has functions for testing int main(void) { lstring wxyz("wxyz"); lstring::length_pos wxyz_lng = 4; cout << "characters of 'wxyz' = "; for (lstring::length_pos i = 0; i < wxyz_lng; ++i) cout << wxyz.getElementAt(i) << " "; cout << endl; // compile-time check of return type. char c = wxyz.getElementAt(0); cout << "first character again is " << c << endl; cout << "That's all, folks!\n"; return EXIT_SUCCESS; }