Hi Takefumi! operator* takes objects and not pointers. Therefore you have to change the last line to root[4] *vec3= (*vec1)*(*vec2) Greets Michael Takefumi SORA writes: > > Hi > > According to ROOT reference and TVector3 class definition, > we can use operation(e.g +,*,.) between TVector3 objects. > For example > root[0] gSystem->Load("libPhysics") > root[1] TVector3* vec1 = new TVector3(1,1,1) > root[2] TVector3* vec2 = new TVector3(2,2,2) > root[3] TVector3* vec3 = new TVector3() > root[4] vec3 = vec1*vec2 > > But when excuting root[4], I got the message: > > Illegal operatior pointer 1 FILE:(tmpfile) LINE:1 > > Why can't I use TVector3 operations? > Please tell me. > > Takefumi
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:15 MET