#include <iostream>
using std::cout;
using std::endl;
struct Point
{
double x;
double y;
double z;
};
Point operator+(const Point& first, const Point& second)
{
Point result;
result.x = first.x + second.x;
result.y = first.y + second.y;
result.z = first.z + second.z;
return result;
}
void print(const Point& p)
{
cout << "x: " << p.x << endl;
cout << "y: " << p.y << endl;
cout << "z: " << p.z << endl;
}
int main()
{
Point a;
a.x = 1.0;
a.y = 2.0;
a.z = 3.0;
Point b;
b.x = 0.1;
b.y = 0.2;
b.z = 0.3;
Point c = a + b;
print(c);
return 0;
}