class vector3{ float x; float y; float z; constructor( float x, float y, float z ) { this->x = x; this->y = y; this->z = z; } vector3 * operator+( vector3 * b ) { this->add( b ); return this; } vector3 * operator+=( vector3 * b ) { this->add( b ); return this; } void add( vector3 * b ) { this->x += b->x; this->y += b->y; this->z += b->z; } }