// @topic T050m10d25x10 class DString -- using fixed-size array of characters // @brief class DString declaration // DString.h #ifndef DSTRING_H_INCLUDED #define DSTRING_H_INCLUDED #include <iostream> class DString { // friends of this class have access to all private members of this class: friend std::ostream& operator<<(std::ostream& cout, DString const& str); friend std::istream& operator>>(std::istream& cin, DString& str); // data members static const int MAX_SIZE = 80; char m_array[MAX_SIZE]; size_t m_length; public: // constructors DString(); // operations size_t length() const; };//class DString // free functions that supplement DString: std::ostream& operator<<( std::ostream& cout, DString const& str ); std::istream& operator>>( std::istream& cin, DString& str ); #endif //DSTRING_H_INCLUDED