I'm very confused about this topic, basically I've this code:
template <typename T>
class SListArray
{
public:
class const_iterator
{
public:
const_iterator(size_t i_currentNode = -1)
:m_position(i_currentNode)
{
}
T const& operator*() const
{
return m_data[m_position].element;
}
// ...
protected:
size_t m_position;
};
explicit SListArray();
// ...
private:
std::vector<Node<T>> m_data;
// ...
};
This code give me a compiler error, so, I would to know if is possible to give the Inner Class the acces to the members of the Outer Class.
Thanks.
See Question&Answers more detail:os