#include #include using namespace std; inline void f() {cout << "friend f\n";} inline void g() {cout << "friend g\n";} class myclass { public: friend void f(); //the function in line 5 friend void g(); //the function in line 6 static void g() {cout << "static member function g\n";} void h() const { f(); //the friend in lines 5 and 10 g(); //the static member function in line 12 ::g(); //the friend in lines 6 and 11 } }; int main() { f(); //the friend in lines 5 and 10 g(); //the friend in lines 6 and 11 myclass::g(); //the static member function in line 12 cout << "\n"; myclass x; x.h(); return EXIT_SUCCESS; }