I have two classes, for argument's sake A and B.
A implements the core functionality, B is an encapsulated data structure.
If you imagine this situation
Code:
class A
{
public:
type function();
private:
type variable;
B object;
};
From within B's member functions, I would like to access the public function() in class A.
This is not an inheritance issue, they are two discrete classes with radically different functionality.
Class A makes an object of B.
If someone could please offer advice about the "best practise" way to set up this communication, I would greatly appreciate it!
I would prefer advice in the form of topics or links to reading material, rather than code samples!
Thank you!