home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / tutorial / cpptutor / source / car.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-05-15  |  375 b   |  23 lines

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