Suppose I have a class A with several subclasses (B, C, and D). I need BC and D to access some protected members from class E. Is it possible to make B, C and D friends of E with one hit without having to list them all?
I tried with:
class E {
friend class A;
...
};
But that does not work.
thanks
source
share