#include using namespace std ; class point { private: int x1 ; int y1 ; //Does not matter under what access we place the declaration under friend void printPoint ( point p1 ) ; friend class B ; }; void printPoint ( point p1 ) { cout << p1.x1 << " " << p1.y1 << endl ; p1.x1 = 5 ; } class B { void anotherPrintFunction ( point p1 ) { cout << p1.x1 << endl ; } }; int main() { return 0 ; }