if you can help me: in composition, can a subclass access the private members of the base class? Because i'm trying to do so yet i get an error saying "cPerson is private".No you cannot normally, private things are private. If you have things you want to share with your derived cousins, you can use "protected".
Another option is to make a "friend" class, which can probe anything, if I remember correctly (have used it once or twice in all the years), but such use is highly discouraged. Usually, its use often indicates something is wrong with your class hierarchy.
Using ";" at the end of a function is personal choice now, right? xD I sometimes do that, i don't know why.Declarations (class, enum) require it, functions do not. It can be confusing at times :)
Just make sure you don't add stray semi-colons in your code bodies, as you insert additional empty statements then, which may cause a few surprises at some points.