August 2012
Intermediate to advanced
976 pages
30h 17m
English
To explore several of these additional features, we’ll define a pair of cooperating classes named Screen and Window_mgr.
A Screen represents a window on a display. Each Screen has a string member that holds the Screen’s contents, and three string::size_type members that represent the position of the cursor, and the height and width of the screen.
In addition to defining data and function members, a class can define its own local names for types. Type names defined by a class are subject to the same access controls as any other member and may be either public or private:
class Screen {public: typedef std::string::size_type pos;private: pos cursor = 0; pos height = 0, width = 0; std::string ...
Read now
Unlock full access