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

From: John Pretz (pretz@umdgrb.umd.edu)
Date: Mon Feb 16 2004 - 17:55:41 MET


Howdy ROOTTALK!!!

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,

John
-- 
---------------Visit my webpage!---------------------
---------http://umdgrb.umd.edu/pretz-----------------







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