In this article we will learn to implement a CPP program using friend function. A C++ program is provided below for implementing friend function. Program is as follows: #include <iostream> using namespace std; class A { private: int x; public: A(int p) { x = p; } friend void display(A &); }; void display(A […]