O
Olumide
Hello -
I know friends normally gives a named class or function (hitherto
called a guest) access to *all* (private and protected) members of the
class that makes the declaration (hitherto called a host). ... I
wonder if there's a way to limit the direct access of the guest class
or function to a subset of the host's member function. For example
class guest{
};
class host{
private:
friend class guest int number; // friendship restricted
char* name;
char sex;
};
Thank you for not flaming me
- Olumide
I know friends normally gives a named class or function (hitherto
called a guest) access to *all* (private and protected) members of the
class that makes the declaration (hitherto called a host). ... I
wonder if there's a way to limit the direct access of the guest class
or function to a subset of the host's member function. For example
class guest{
};
class host{
private:
friend class guest int number; // friendship restricted
char* name;
char sex;
};
Thank you for not flaming me
- Olumide