Hi Davide, Your cast of a TArrayD to a TObject is illegal. TArrayD does not derive from TObject. Use a TVectorD instead of a TArrayD and it will work. Rene Brun Davide Cremonesi wrote: > > Hello everybody, > I'm probably doing something wrong but cannot find out what. > Could someone explain me what happens? > > in root I type: > > TObjArray a > TArrayD one(1) > a.Add((TObject*)&one) > a.Remove((TObject*)&one) > > *** Break *** illegal instruction > > Even with a heap allocated object the result is the same: > TObjArray b > TArrayD *two=new TArrayD(2) > a.Add((TObject*)two) > a.Remove((TObject*)two) > > *** Break *** illegal instruction > > Thanks for any hint. > Davide Cremonesi, IFCTR MI.
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET