// @topic T050m10d25x30 class DString -- using fixed-size array of characters // @brief main driver code #include <iostream> #include <cstdlib> #include <string> #include "DString.h" int main() { DString str; // using our own "dynamic string" std::cout << str.length() << "\n"; while ( std::cin ) { std::cin >> str; std::cout << "you entered [" << str << "]\n"; } system("pause"); return 0; } // compare to main() that uses standard string: int std_main() { std::string str; std::cout << str.length() << "\n"; while( std::cin ) { std::cin >> str; std::cout << "you entered " << str << "\n"; } system("pause"); return 0; }