There are 3 types of relationships with classes, "IS A" implies public inheritance, "HAS A" means a class has a member variable that is a different class, and "USES A" means a Class function has a parameter which is a different class.
So, in your case a Person should HAVE An address. So you don't need inheritance for this.
Btw, don't use plurals for your class names, because a class is used to instantiate ONE object. A container of objects can have a plural name though.
Don't have protected member variables, make them all private, and provide an interface for your class (but don't have trivial get / set functions for everything). Get functions by themselves are not bad, but only provide them if you need them.
Provide constructors for your classes.
Make use of initialiser lists to set values of member variables initially.
With class functions, think about what the object needs to do, using verbs - make these the function names.
If you want to print out all the details of an object, then write a function to do that, rather than calling a bunch of get functions.
the reason why I'm using inheritance in this class is because I'm mainly trying to understand how to use inheritance
Ok, so choose an example that does need inheritance, like geometry shapes, animals etc - I am sure you can Google up some more examples.
are you saying that I don't protected even if I'm trying to do inheritance
Yes, according to Scott Meyers, one shouldn't have public member variables, and the arguments against them are the same as for having protected member variables. Have a read of the tutorial at the top left of this page, about how to make an interface for a class, and calling base class constructors, amongst other things.
and I don't understand how the rule of three is causing line 39 to be incorrect.
Bdanielz was saying that line 39 was wrong and you also need the rule of 3.