#include<iostream>
using namespace std;
class A
{
private:
int z;
public:
void b(int v)
{z=v;}
friend void print(A);
};
void print(A a)
{
int m=a.z+10;
cout<<m;
}
int main()
{
A s;
s.b(5);
print(s);
return 0;
}
using namespace std;
class A
{
private:
int z;
public:
void b(int v)
{z=v;}
friend void print(A);
};
void print(A a)
{
int m=a.z+10;
cout<<m;
}
int main()
{
A s;
s.b(5);
print(s);
return 0;
}
No comments:
Post a Comment