Hi guys I have a problem with my program. I'm new with c++ and I'm trying to code generic programming but, as usual, I have a lot of errors from my program. I'm trying my very best but I don't understand where my error is. I want a template class where i describe a method add() that take a sum, the c'tor and compute() which make an arithmetic average of sum. nAdd is the number of element. thank you very much!

```
template<typename T>
class AccumulatorMean {
public:
AccumulatorMean() : sum(0), nAdd(0), media(0) {};
T add(const T& data);
T compute();
private:
int nAdd;
T sum;
T media;
};
template <typename T>
T& AccumulatorMean::add(const T& data) {
sum += data;
nAdd++;
return sum;
}
template <typename T>
T& AccumulatorMean::compute() {
media = sum/nAdd;
return media;
}
int main() {
AccumulatorMean a;
a.add<int>(5);
}
```