As for your other question - what do you do with Character &getCharacter() -- I'll explain briefly.
Notice that in your Item class, getCharacter() is marked for protected access--
//previous code in Item class...
protected:
Character &getCharacter();
This allows anything that derives from the Item class (basically, anything that IS-A item) to inherit this method.
If I hadn't done this, and left it private for example--
private:
Character &getCharacter();
--derived objects of type Item would not have access of getCharacter(). Nobody would, except within the class Item, which is pointless because we aren't working within the Item class environment.
If we made it public, we'd have other problems - it would be visible and accessible so long as the Item object is publicly visible itself.
Basically, we only want to concern the reference to the Character with Item types, which is why it is marked protected.
Now that we know that the getCharacter() method will only be accessed by Item types, we then know that only Item types will be altering the actual Character reference when they encapsulate the Character reference to something they can access it with (in this case, the invoker pointer).
After setting the Character reference, we can retrieve the character reference via getCharacter(), since invoker is a private variable within the abstract Item class that we will not inherit when extending from that class.
struct Hi_Potion : public Item
{
//this struct does NOT inherit private member …