I'm quite new in C++ and I would like to learn good practices from the beginning, so my question explained with an example is:
Having:
class A
{
int mNumber;
};
If I need to use class A inside class B, what is better?to include an object?
class B
{
A * mpA;
int mColor;
};
Or inherit from Class A?
class B : public A
{
int mColor;
};
Is there any good habit talking in a generally way to do this?