#include <iostream>

#include <cmath>

using namespace std;

struct Point3D {

int x;

int y;

int z;

};

Point3D AddTwoPoints(Point3D a, Point3D b)

{

float c2.x = b.x + a.x; /*outputs error expected initializer before '.' token

float c2.y = b.y + a.y;

float c2.z = b.z + a.z; */

return;

}

Point3D SubtractTwoPoints(Point3D a, Point3D b) {

float d2.x = b.x - a.x; /*outputs error expected initializer before '.' token

float d2.y = b.y - a.y;

float d2.z = b.z - a.z; */

return;

}

int main()

{

Point3D a2, b2;

a2.x = 4;

a2.y = 7;

a2.z = -14;

b2.x = 5;

b2.y = 5;

b2.z = 10;

Point3D c2 = AddTwoPoints(a2, b2);

cout << "Add a2 and b2: (" << c2.x << "," << c2.y << "," << c2.z << ")" << endl;

Point3D d2 = SubtractTwoPoints(a2, b2);

cout << "Subtract b2 from a2: (" << d2.x << "," << d2.y << "," << d2.z << ")" << endl;

return 0;

}