If you want to use a cpp file for your constructor you should write
// File Vector3.cpp #include "Vector3.h" namespace VectorMath { Vector3::Vector3 (float x, float y, float z) { this->x=x; //... } The addition should be implemented as follows if you keep it in the same namespace
Vector3 Vector3::operator+(const Vector3& v) { return Vector3 (x+v.x,y+v.y,z.vz+v.z); } }