https://github.com/root-project/root
Raw File
Tip revision: be74382292a29ef72a13d39a6eef7316572e63d3 authored by Fons Rademakers on 24 November 2011, 15:43:23 UTC
tag patch release v5-28-00h.
Tip revision: be74382
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