dimanche 27 octobre 2019

Trying to receive a template in a struct and use it on a std::vector

I'm trying to create a tree class to a test, but I'm getting: "error: type/value mismatch at argument 1 in template parameter list for 'template class std::vector".

template <typename T>
struct a {
T data;
void ReceiveData(T T_data) {
    data = T_data;
}
};
struct b {
std::vector<a> b_data;//Error here
};

Aucun commentaire:

Enregistrer un commentaire