Variable argument lists

Hello,
I have problem with variable argument lists in collection classes:TList l; o1 = new TNamed("o1", ""); o2 = new TNamed("o2", ""); o3 = new TNamed("o3", ""); o4 = new TNamed("o4", ""); l.AddVector(o1, o2, o3, o4); o5 = new TNamed("o5", ""); o6 = new TNamed("o6", ""); l.AddVector(o5, o6); l.ls();[quote]OBJ: TNamed o1 : 0 at: 0x988a790
OBJ: TNamed o2 : 0 at: 0x98887f8
OBJ: TNamed o3 : 0 at: 0x9893428
OBJ: TNamed o4 : 0 at: 0x98566b0
OBJ: TNamed o5 : 0 at: 0x98984a8
OBJ: TNamed o6 : 0 at: 0x989da28
OBJ: TNamed o3 : 0 at: 0x9893428
OBJ: TNamed o4 : 0 at: 0x98566b0[/quote]list contains 8 entires (instead 6) ?! this is feature of ROOT or stdarg(va_arg, va_list, …) of gcc ?

FC6, gcc 4.1, cvs version of ROOT

Thanks, Jan

Thanks Jan for reporting this problem (with variable arg list).
We will investigate.

Rene

Hi Jan,

the last argument in the list of objects to be added must be 0, e.g.:

The documentation did not mention this and I’ve corrected that.

Cheers, Fons.