Advertisement
reellearning

Overloaded Insertion Operator - VPetApp.cpp

Jun 4th, 2012
611
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. /*
  2.  * VPetApp.cpp
  3.  *
  4.  *  Created on: Jun 4, 2012
  5.  *      Author: Derek
  6.  */
  7.  
  8. #include "VPet.h"
  9. using namespace std;
  10.  
  11. int main()
  12. {
  13.     VPet bob(150, false);
  14.     bob.feedPet(25);
  15.  
  16.     VPet sam;
  17.     sam.feedPet(10);
  18.  
  19.     cout << "Bob weighs: " << bob.getWeight() << endl;
  20.     cout << "Sam weighs: " << sam.getWeight() << endl;
  21.  
  22.     cout << bob << endl;
  23.     cout << sam << endl;
  24.  
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement