// str.h: String class with reference counting
#include <string.h>
class String
{
public:
// Constructors / Destructor
String(const char *s);
String(const String& s);
~String();
// other members omitted...
private:
class Srep
{
public:
Srep(const char*);
~Srep();
char *rep;
size_t count;
};
Srep *rep;
};
// End of File