mardi 1 septembre 2015

Defining trait in parent class

I have a hierarchy of "codecs" to encode/decode various things to a binary stream. They all inherit from a parent Codec class, on which I'd like to define a few types, to use in the subclasses, as in:

class Codec {
  public:
    typedef char* pointer;
    ...
};

Alas, the type pointer seems to be unknown in the subclasses of Codec. Is there any way I could it make visible in the subclasses?

Aucun commentaire:

Enregistrer un commentaire