https://github.com/root-project/root
Raw File
Tip revision: 1ed40bc611fae8512a42dc3e408c30f113a324fe authored by Rene Brun on 25 June 2008, 07:37:08 UTC
Tagging production version 5.20
Tip revision: 1ed40bc
t674.h
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (cint@pcroot.cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/

#include <stdio.h>
#include <string.h>

class string {
  char buf[100];
 public:
  string() { printf("string()\n"); buf[0] = 0; }
  string(const char* x) { printf("string(%s)\n",x); strcpy(buf,x); }
  string(const string& x) {
    printf("string((string)%s)\n",x.c_str()); 
    strcpy(buf,x.c_str()); 
  }
  ~string() { printf("~string(%s)\n",buf); }
  const char* c_str() const { return(buf);}
};
back to top