Answer Posted / vijaya
Sometimes a function is best shared among a number of
different classes. Such functions can be declared either as
member functions of one class or as global functions. In
either case they can be set to be friends of other classes,
by using a friend specifier in the class that is admitting
them. Such functions can use all attributes of the class
which names them as a friend, as if they were themselves
members of that class. A friend declaration is essentially a
prototype for a member function, but instead of requiring an
implementation with the name of that class
attached by the double colon syntax, a global function or
member function of another class provides the match.
| Is This Answer Correct ? | 90 Yes | 15 No |
Post New Answer View All Answers
Can we extend multiple classes in php?
What are the encryption functions in php?
What is api laravel?
How does php session work?
What is die in php?
What is boolean in php?
How to invoke a user function?
How can you associate a variable with a session?
Swap two variables value without using third variable in php ?
What is $_ env in php?
Where do I run php code?
Can we use onclick in submit button?
Explain mixed and callback functions?
How can we display information of a variable and readable by human with php?
Which operator is used to combine string values in php?