#include <iostream>
usingnamespace std;
class First{
int a;
int b;
public:
First(int c,int d):a(c), b(d){};
int sum(){ return (a+b); }
friendint mmm(int, int) ;
};
int mmm(int x, int y) {
int z=x+y;
return z;
}
int main(){
First sum1(2,3);
First sum2(4,5);
cout<<sum1.sum()<<endl;
cout<<sum2.sum()<<endl;
int r;
r = mmm(sum1.a, sum1.b);
cout<< r <<endl;
return 0;
}
#include <iostream>
usingnamespace std;
class First{
int a;
int b;
public:
First(int c,int d):a(c), b(d){};
int sum(){ return (a+b); }
friendint mmm(int, int) ;
};
int mmm(First f) {
return f.a+f.b
}
int main(){
First sum1(2,3);
First sum2(4,5);
cout<<sum1.sum()<<endl;
cout<<sum2.sum()<<endl;
int r;
r = mmm(sum1);
cout<< r <<endl;
return 0;
}