Original Post
Hi, how do I make a private member function a friend of another class?? e.g something like Is there anyway to make Foo::Method() a friend of class Bar without making Method public?? Thanks.
class Foo
{
private:
void Method();
};
class Bar
{
friend void Foo::Method(); //this gives an error
};