Today i have a doubt regarding friend function. Can two classes have same friend function? Say example friend void f1(); declared in class A and class B. Is t
friend void f1();
There is no restriction on what function can or cannot be friends's of class's, so yes there's no problem with this.
friends
class