#include <iostream> using namespace std; class A { void f(); }; class B { friend void A::f(); }; int main() { return 0; }
Standard input is empty
prog.cpp:6:6: error: ‘void A::f()’ is private
void f();
^
prog.cpp:11:18: error: within this context
friend void A::f();
^
Standard output is empty