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

  1.                                   // Chapter 7 - Program 5
  2. #include "car.h"
  3.  
  4.  
  5. void car::initialize(int in_wheels, float in_weight, int people)
  6. @{
  7.    passenger_load = people;
  8.    wheels = in_wheels;
  9.    weight = in_weight;
  10. @}
  11.  
  12.  
  13. int car::passengers(void)
  14. @{
  15.    return passenger_load;
  16. @}
  17.  
  18.  
  19.  
  20.  
  21. // Result of execution
  22. //
  23. // (this file cannot be executed)
  24.