An ugly (but working) solution...
// the constructor setting a color
body::body(const Color *c)
// we just grab the pointer to the color provided.
color = new Color (c->red(), c->green(), c->blue());
our_color = 1; // we made the color class.
We just “copy” the color by making a new object with the same properties as the color passed as a parameter. So we do not retain a pointer to the outer Color object (which the compiler did not like because it violated the const contract).
However, this exposes our constructor unneccesarily to the innards of “Color”, because a better Color object might not have those member functions.
In a few moments you will learn about a better way to just copy one object to another.
But we have to learn a few new things first...