Here is my issue:
I have a std::vector<AguiWidgetBase*>
which is used to keep track of child controls.
I have these two functions to return iterators:
std::vector<AguiWidgetBase*>::const_iterator AguiWidgetBase::getChildBeginIterator() const
{
return children.begin();
}
std::vector<AguiWidgetBase*>::const_iterator AguiWidgetBase::getChildEndIterator() const
{
return children.end();
}
I then use it like this:
for(std::vector<AguiWidgetBase*>::const_iterator it = box->getChildBeginIterator();
it != box->getChildEndIterator(); ++it)
{
it->setText("Hello World");
}
and I get these errors:
Error 3 error C2039: 'setText' : is not a member of 'std::_Vector_const_iterator<_Ty,_Alloc>' c:\users\josh\documents\visual studio 2008\projects\agui\alleg_5\main.cpp 112
Error 2 error C2839: invalid return type 'AguiWidgetBase *const *' for overloaded 'operator ->' c:\users\josh\documents\visual studio 2008\projects\agui\alleg_5\main.cpp 112
Why is it giving me these errors?
Thanks