Skip to content

Opening book details…

Can I read Function Overloading and Friend Functions on EtoBox?

Function Overloading and Friend Functions by Naveen Chaubey is a document available to read on EtoBox.

What is Function Overloading and Friend Functions about?

The document provides an example of function overloading in C++. It overloads the volume() function three times to calculate the volume of a cube, cylinder, and rectangular box. The main() function calls each overloaded volume() function and outputs the results. A second example demonstrates a friend function that can access private members of a class. The mean() friend function calculates the average of two private variables in the sample class.

Author
Naveen Chaubey
Language
EN

More by Naveen Chaubey

Browse all works by Naveen Chaubey