J
John
I have a class of my own which has a 2d matrix of type T. I want to
give the users of my library an iterator to iterator thru all the
elements of this matrix ( they dont need to know anything about the
internal matrix). What is the easiest way to do this?
template< typename T >
class X{
// X::iterator needs to be defined for parsing data.
// const_iterator?
private:
vector< vector< T > > data;
}
Thanks,
--j
give the users of my library an iterator to iterator thru all the
elements of this matrix ( they dont need to know anything about the
internal matrix). What is the easiest way to do this?
template< typename T >
class X{
// X::iterator needs to be defined for parsing data.
// const_iterator?
private:
vector< vector< T > > data;
}
Thanks,
--j