Friend Function A friend function is a function that is not a member of a class but is granted special access to the class’s private and protected members. Declared using the keyword friend inside the class. Syntax class ClassName { private: int data; public: // Declaration of friend function friend void dis…
Read moreI nline function An inline function is a function for which the compiler replaces the function call with the actual function code at compile time. Usability of Inline Functions Problem with Normal Functions Normal function calls cause: Function call overhead Stack…
Read moreFunctions and objects · In Object-Oriented Programming (OOP) , functions that belong to a class are called member functions . · When these functions are accessed using an object , they operate on the data members of that object . · Objects store data, and functions operate on that data Basic Structure of a Class w…
Read more
Social Plugin