prog.cpp: In function ‘sample operator+(sample)’:
prog.cpp:14: error: invalid use of ‘this’ in non-member function
prog.cpp:14: error: invalid use of ‘this’ in non-member function
prog.cpp:4: error: ‘int sample::x’ is private
prog.cpp:14: error: within this context
prog.cpp:15: error: invalid use of ‘this’ in non-member function
prog.cpp: In function ‘int main()’:
prog.cpp:24: error: no match for ‘operator+’ in ‘s2 + s1’
prog.cpp:12: note: candidates are: sample operator+(sample)