C++ Program to swap two members using Friend Function
Pre-requisite: Friend Function CASE 1: Given two numbers a & b, swap these two numbers using friend function of C++. Examples: Input : a =… Read More »
Pre-requisite: Friend Function CASE 1: Given two numbers a & b, swap these two numbers using friend function of C++. Examples: Input : a =… Read More »
Friend Class A friend class can access private and protected members of other class in which it is declared as friend. It is sometimes useful… Read More »
The idea of Encapsulation is to bundle data and methods (that work on the data) together and restrict access of private data members outside the… Read More »