[ROOT] static consts as class members

From: Mykulyak Andriy (A.Mykulyak@gsi.de)
Date: Wed Aug 28 2002 - 14:22:07 MEST


Hello,

I wonder, why I cannot use consts as static class members. 

class TAFextPropHit : public TObject {
public:
	static const Int_t kSignalCount = 8;
	static const Float_t kScaleFactor = 1.5;

	TAFextPropHit();
	virtual ~TAFextPropHit();
	...

	ClassDef(TAFextPropHit, 1)
	...	
};

The class above will compile, but the shareable library built out of it will
not load into the ROOT runtime. 

Of course, for integer-like constants one can use enums, but what about
floating-point or string types ?

Thanks,
Andriy.

------
Andriy Mykulyak
GSI, Planckstrasse 1, D-64291 Darmstadt
A.Mykulyak@gsi.de
Tel: +49-6159-71 2772 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:06 MET