Gordon Watts (Brown University) wrote: > > Hi, > The below file is called "bummer.cpp" I use ".L bummer.cpp" to load it > into CINT in Root (1.03/05, Windows NT), and then do: > > junk stuff; > stuff.Dump(); > > And I access violate (i.e. root crashes). Am I doing something stupid, or > is this a bug? I was doing this chasing down a second problem.... I notice > that for some of my objects the Dump prints garbage for array members... is > this a known problem? > > CHeeers, > Gordo. > > { > class junk : public TObject { > public: > float _position[3]; > float _temp; > int _temp_i; > float _met[2]; > > junk (void) > { _position[0] = 0; _position[1] = 0; _position[2] = 0; > _temp = 0; _temp_i = 0; _met[0] = 0; _met[1] = 0;}; > > }; > } Interpreted classes cannot derive from compiled classes with the current versions of ROOT and CINT. Interpreted classes can call compiled classes. We know that this is a very important limitation of the interpreter. However, the implementation of this feature requested by many users is non-trivial. The virtual table of the interpreted class must be patched with the VTBL of the compiled class. The native compiler may have to call a function of your interpreted class ! Implementing this feature is highly compiler dependent (Masa, may be you can comment this point). We recommend creating/compiling your own classes via the standard compiler (see examples of makefile in ROOTSYS/test/Makefile). This makefile shows how to make your own classes callable from the interpreter. Rene Brun
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET