I want to make a class A friend class of class B. I want to do this as these interact very much and A needs to change internals of class B (which I dont want to expose using
You can do following thing..
class A{ }; class B{ private: void setFlags(); protected: void setState(); }; class RestrictedB :public B{ friend class A; };