Guest User

Untitled

a guest
Feb 23rd, 2012
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. class Balls
  2. {
  3.         int hp;
  4.     public:
  5.         void SetHP(int h) {hp = h;}
  6.         int GetHP() {return hp;}
  7. };
  8. void LOL(Balls *target)
  9. {
  10.     target->SetHP(target->GetHP() - 10);
  11. }
  12.  
  13. int main()
  14. {
  15.     Balls *kiausas;
  16.     kiausas->SetHP(20);
  17.     LOL(kiausas);
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment