Listing 7 A class definition for str objects that can be placed in a container of common *

//
// comstr6.h - a "common" str type for containable str objects
//

#ifndef COMSTR_H_INCLUDED
#define COMSTR_H_INCLUDED

#include <iostream.h>
#include "common.h"
#include "str.h"

class comstr : public common
   {
public:
   virtual common &operator=(const common &c);
   virtual common *dup() const;
   virtual size_t size() const;
   virtual ostream &write(ostream &s) const;
   virtual istream &read(istream &s);
   virtual ~comstr();
   operator str &();
private:
   str e;
   };

#endif

/* End of File */