RE: [ROOT] vector::iterator in an STL vector my own class

From: Philippe Canal (
Date: Tue Feb 17 2004 - 20:00:35 MET


You need to generate the dictionary for the iterator:

	#pragma link C++ nestedclass;	
	#pragma link C++ vector<MyClass>::iterator;


-----Original Message-----
[]On Behalf Of John Pretz
Sent: Monday, February 16, 2004 10:56 AM
Subject: [ROOT] vector::iterator in an STL vector my own class


Apologies if this is in the documentation or on the mailing lists.  I just 
can't find it.

I have a class (ClassA in this example) of my own that I'd like to put 
into an STL vector and iterate over it using vector::iterator.  I'd really 
like to do this from the command line, if possible.

In this example, I fill up an STL vector<ClassA> with some data.  If I get 
it out using the vector's 'array syntax' all is well.  But if I try the 
vector::iterator syntax, I'm hosed.

I'm using root 3.10.01 on a redhat 9 machine.  gcc 3.2.

The attached code should show off all my problems.  'make' will compile 
the code and run the test.

Thanks for looking,

---------------Visit my webpage!---------------------

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET