mercredi 14 décembre 2022

Iterating through vector in a vector (template class)

I have a template class that stores vectors in a vector:

template <class T, typename T::value_type SepC, typename T::value_type HigC, typename CharT = typename T::value_type>
class book {
    private:
        std::vector< std::vector<T> > content_;

The T can be any container type (for example string, or list).

I have tried to iterate through the content_ with iterators, but not really working for me.

Could someone show me the right way to do it? What can be the problem?

Aucun commentaire:

Enregistrer un commentaire