rootcint has never been able before version 2.24 to generate a correct code for Streamer functions for classes containing pointers to basic types. A warning message was always printed by rootcint. The new version of rootcint can generate automatically correct code if you tell what is the length of the array. The convention we have adopted is to specify the length of the array in the comment field of the data member declaration statement. In your case, do Int_t n; //length of array Int_t *array //[n] The length of teh array is given in [n] where n must be a data member declared in the header file before the definition of the array. Rene Brun On Fri, 12 May 2000, Vladimir Pechenov wrote: > > > > Hello, > > I have experienced new behaviour of rootcint package trying to update > my program to the newest version of ROOT (224-04) > > Here is a simplified version of my Class > > > > > > > > > #ifndef HMYCLASS_H > > #define HMYCLASS_H > > > > #include "TObject.h" > > > > class HMyClass : public TObject { > > protected: > > // ... > > Int_t* array; > > // ... > > public: > > HMyClass(Int_t len); > > ~HMyClass(); > > Int_t getVl(Int_t n) {return array[n];} > > void setVl(Int_t n, Int_t v) {array[n]=v;} > > // ... > > ClassDef(HMyClass,1) > > }; > > > > #endif /*!HMYCLASS_H*/ > > > > ------------------------------------------------ > > > > #include "hmyclass.h" > > > > ClassImp(HMyClass) > > > > > > HMyClass::HMyClass(Int_t n) { > > // ... > > array= new Int_t [n]; > > // ... > > } > > > > HMyClass::~HMyClass() { > > delete [] array; > > // ... > > } > > > > ------------------------------------------------ > > > and while creating the dictionnary i got this message from rootcint: > > > > > *** Datamember HMyClass::array: size of array () UNKNOWN ERROR!!!!! > > *** Datamember HMyClass::array: pointer to fundamental type (need manual > > intervention) > > > > > > Note that this message disappear when i disable object IO putting > ClassDef(HMyClass,0). > > Any Hints? > > Vladimir and Denis > > >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:25 MET