Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Balls
- {
- int hp;
- public:
- void SetHP(int h) {hp = h;}
- int GetHP() {return hp;}
- };
- void LOL(Balls *target)
- {
- target->SetHP(target->GetHP() - 10);
- }
- int main()
- {
- Balls *kiausas;
- kiausas->SetHP(20);
- LOL(kiausas);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment