hello, i have a class template
template <class _cType> class t3dpoint {
public:
_cType x;
_cType y;
_cType z;
};
now when it was just simple struct i could do
t3dpoint __fastcall vectorAB(t3dpoint A,t3dpoint B)
{
t3dpoint result;
result.x = B.x-A.x;
result.y = B.y-A.y;
result.z = B.z-A.z;
return result;
}
i came out with that thing i have no idea what should i write:
template <class type> t3dpoint<type> vectorAB(type A, type B)
{
t3dpoint<type> result;
result.x = B.x-A.x;
result.y = B.y-A.y;
result.z = B.z-A.z;
return result;
}
so how should i deal with this