Oh My God. It Just Hit Me.
I now realize why pointers are so important. While sitting there for a while, trying to think of a way to work out a problem, I thought of an idea.
In my RPG, I wanted a different enemy object to be created each time you defeat one enemy. This would mean having to create many different objects. How on Earth would I make so many hundreds of functions without given myself a hear-attack, and at the cost of TONS of memory? OMG! Pointers! Yay!
It's so obvious now:
When a new enemy is created:
Those are passed to the constructor:
int EHPX = Accessor.GetEHP(); // Not global, BTW.
int EATTX = Accessor.GetEAtt();
Enemy * BadGuy = new Enemy(EHPX,EATTX);
Then, when the enemy is defeated:
Enemy::Enemy(int a, b)
EHP = a;
EAtt = b;
Yay! I just use the object once, make it stronger after it dies, and then throw it away! When you encounter another enemy, another one is created, slightly stronger, and the process starts over.
BadGuy->SetEHP(1); //strengthens enemy
BadGuy->SetEAtt(1); //strengthens enemy
Yay for pointers!:D