I have reached a problem and was wondering if someone could help me please.
In one of my classes (e.g. class1) I have a
typedef boost::shared_ptr <class-one-object>
typedef std::vector<class-one-object>
In another class (e.g. class2) I need to create a vector of this again, in order to iterate through this
class-one-object
so I was trying the following
class1::ImportTableObject& table = configPtr->getTable();
std::vector<class1::class-one-object>::const_iterator* iter = table.begin();
This was throwing the following compilation error:
cannot convret `__gnu_cxx::__normal_iterator<boost::shared_ptr<class1::class-one-object>*, std::vector<boost::shared_ptr<class1::class-one-object>,
std::alloctor<boost::shared_ptr<class1::class-one-object> > > to '__gnu_cxx::__normal_iterator<const class1::class-one-object*, std::vector<class1::class-one-object>
etc etc
Can anyone help me please?
thank you in advance
begindoesn’t return a pointer to an iterator, it returns an iterator.should do the trick.