I have a template class as below
template<typename T>
class HMM{
private:
int states_num;
int observables_num;
std::vector<std::vector<T>> t_probs( states_num, std::vector<T>(states_num, T{}) );
public:
HMM(int s, int o):states_num(s),observables_num(o){}
};
But I am getting an compilation error
error: ‘states_num’ is not a type
, here states_num
is an int
, not a type depending on T
, why I am getting this error?