0

```
#ifndef TINYVEC_HPP
#define TINYVEC_HPP
#include <iostream>
#include<iomanip>
using namespace std;
template<typename T_numtype, int N_length>
class TinyVector
{
protected:
T_numtype data[N_length];
public:
//////////////////////////////////////////////////////
// Constructor
//////////////////////////////////////////////
TinyVector() { }
~TinyVector() { }
TinyVector(const TinyVector<T_numtype,N_length>& x);
TinyVector(const T_numtype & initValue);
TinyVector(const T_numtype x[]);
TinyVector(const T_numtype & x0, const T_numtype & x1);
TinyVector(const T_numtype & x0, const T_numtype & x1, const T_numtype & x2);
double operator*(const TinyVector<T_numtype, N_length> &);
};
#include "TinyVector.cxx"
#endif
template<typename T_numtype, int N_length>
double TinyVector<T_numtype, N_length>::operator*(const TinyVector<T_numtype, N_length> & x)
{
double temp=0.0;
for (int i=0; i < N_length; ++i)
temp=temp+data[i]*x[i];
return temp;
}
Dear freinds:
I write a vector class template, but i can not compute a double number multiplies a vector, i have overload the * operator in the template, could you plese tell me how to resolve it.
Regards
```