Advertisement

Template syntax...

Started by April 02, 2001 05:33 AM
3 comments, last by gimp 23 years, 10 months ago
template class CObject { blah... }; I''ll be putting Objects in a vector. How can I typedef an iterator to this? typedef std::vector::iterator ObjectPointer; I can''t seem to work out what goes in there? Thnaks Chris
Chris Brodie
  typedef vector<CObject<int>>::iterator ittr;  

Advertisement
I think what Grib ment was

typedef vector< CObject&ltint> >::iterator ittr;

Or, better yet:

typedef CObject&ltint> IntObject
typedef vector&ltIntObject> IntObjectVector
typedef IntObjectVector::iterator IntObjectVectorIttr

Edited by - Don Neufeld on April 2, 2001 4:46:50 PM
dammit! its that fscking shift operator, yeah, spaces are needed.
I really hate that.


with g++, it will tell you maybe spaces needed, but with VC, it will just cry for no reason, you don''t even know why
------------------------------------------------------CCP is fascistic, they even banned www.sourceforge.net

This topic is closed to new replies.

Advertisement