View difference between Paste ID: YjrKmNHJ and VZ3biS2L
SHOW: | | - or go back to the newest paste.
1
class Balls
2
{
3-
		int hp;
3+
	int hp;
4-
	public:
4+
public:
5-
		void SetHP(int h) {hp = h;}
5+
	void SetHP(int h) {hp = h;}
6-
		int GetHP() {return hp;}
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
}