String body

letter

  class stringrep {
  friend string;
  private:
  stringrep(char* s) {
  	rep = new char[strlen(s)+1]; strcpy(rep,s);
  	count = 1;
  	}
  ~stringrep() { delete[] rep; }
  char* rep;
  int count;
  };
  

slide: A string body class