friend function?

Friend declaration can be placed anywhere in the class declaration.
Friend function that is a "friend" of a given class is allowed access to public, private, or protected data in that class.