#include
#include
using namespace std;
struct A {
int n;
A() { };
A(int n_ ):n(n_) { }
A operator+( A& p){
A tmp(n+p.n);
return tmp;
}
};
int main()
{
A c;
const A a(10);
c = a + A(30);
cout << c.n << endl;
return 0;
}
#include <iostream>
#include <string>
using namespace std;
struct A {
int n;
A() { };
A(int n_ ):n(n_) { }
A operator+(A p) const {
A tmp(n+p.n);
return tmp;
}
};
int main()
{
A c;
const A a(10);
c = a + A(30);
cout << c.n << endl;
return 0;
}