home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / info / c_tutorg / box.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-05-24  |  378 b   |  19 lines

  1.                                  // Chapter 5 - Program 7
  2.  
  3. class box @{
  4.    int length;
  5.    int width;
  6. public:
  7.    box(void);         //Constructor
  8.    void set(int new_length, int new_width);
  9.    int get_area(void) @{return (length * width);@}
  10.    ~box(void);        //Destructor
  11. @};
  12.  
  13.  
  14.  
  15.  
  16. // Result of execution
  17. //
  18. // This header file cannot be compiled or executed
  19.