home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / compiler / rtti / impl.cpp next >
Encoding:
C/C++ Source or Header  |  1996-02-20  |  499 b   |  28 lines

  1. //
  2. // member function definitions 
  3. // provided by the library vendor 
  4. //
  5. // customers do not have access
  6. // to the source code for this file
  7. // 
  8. #include <new.h>
  9. #include <string.h>
  10. #include "impl.h"
  11.  
  12. employee::employee(char* n, int hr) : hourRate(hr) {
  13.   Name = new char[strlen(n)+1];
  14.   strcpy(Name, n);
  15. }
  16.  
  17. employee::~employee() {
  18.   delete[] Name;
  19. }
  20.  
  21. int manager::salary() {
  22.   return (hourRate*40+Experience*10); 
  23.  
  24. int programmer::salary() {
  25.   return (hourRate*40);
  26. }
  27.