Hi George,
this works:
// vec.C
void vec() {
TVector *winmin = new TVector(5);
winmin(0)=6;
winmin(1)=55;
winmin(2)=128;
winmin(3)=40;
winmin(4)=125;
winmin->Print();
}
what is your plroblem?
Cheers, Fons.
Georges Lobo wrote:
>
> Hi rooters,
> I have a small problem using a TVector
> executing this sequence in a root interactive session works fine
> root [1] TVector *winmin = new TVector(5);
> root [2] winmin(0)=6;
> root [3] winmin(1)=55;
> root [4] winmin(2)=128;
> root [5] winmin(3)=40;
> root [6] winmin(4)=125;
> root [7] winmin->Print();
>
> Vector 5 is as follows
>
> | 1 |
> ------------------
> 0 | 6
> 1 | 55
> 2 | 128
> 3 | 40
> 4 | 125
>
> But putting this instructions in a macro gives me an error
> Error: invalid pure virtual function initializer FILE:init.C LINE:3
> The Line 3 is where I fill the vector.
> Any hint ?
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://root.cern.ch/~rdm/ Fax: +41 22 7677910
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:52 MET