#include<iostream>
using namespace std;
class cl
{
int a;
public:
void input(int x)
{
a=x;
}
void output()
{
cout<<a<<endl;
}
friend void f(cl ); // the function f() is a friend function , which can access the private member of class cl.
};
// The functiin f is not a member function of f(cl ) . For this reason no scope resolution operator is used .
void f(cl ob)
{
cout<<ob.a<<endl; // ob.a is a private member of class cl.
}
int main ()
{
cl ob;
cout<<"sunday"<<endl;
ob.input(100);
cout<<"monday"<<endl;
ob.output();
cout<<"friday"<<endl;
f(ob);
}