/* -*- C++ -*- */ /************************************************************************* * Copyright(c) 1995~2005 Masaharu Goto (root-cint@cern.ch) * * For the licensing terms see the file COPYING * ************************************************************************/ /************************************************************************** * cpp5.cxx * * operator overloading for array type * operator=() overloading * **************************************************************************/ #include #include #include /********************************************************** * class complex **********************************************************/ int nstore; class array { public: double dat[100]; int n; public: array(double x); array(double x,int ndef); ~array() ; void print(void); array operator=(array a); array operator<<(int shift); array operator>>(int a); array operator()(int a, int b); } ; array::~array() { // free(dat); } array::array(double x,int ndef) { // dat = malloc(ndef*sizeof(double)); for(n=0;n