To simplify my problem, I have something like this:
class Base {
private:
protected:
int a,b;
string c;
public:
[some functions here]
}
class Derived : public Base{
[some variables and functions]
friend void function();
}
void function(){
int d[a][b];
[stuff]
}
basically, my void function needs to access stuff that is in the protected class of the base class. I'd like to keep those variables defined in the protected section. Is there anyway for function, which HAS to be friended into the Derived class, to be able to access a and b?