Question about static class objects

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Mon, 26 May 2008 13:11:54 -0500


I am puzzled why this fails (Root 5.16 or 5.18, on Fedora Core 8).

	file zap.C contains:
		class Zap {
		public:
		        static TList list;
		};
		TList Zap::list;


$ root -l
root [0] .L zap.C root [1] Zap::list.Clear(); *** Break *** segmentation violation [....] But this works:
$ root -l
root [0] TList zap; root [1] zap.Clear(); root [2] .q

Any suggestions how to work around this?

Tom Roberts Received on Mon May 26 2008 - 20:12:43 CEST

This archive was generated by hypermail 2.2.0 : Tue May 27 2008 - 23:50:01 CEST