access overloaded operator in c++
<p>I have overloaded the [] operator in my class. here is the implementation</p>

<pre><code>Node* List::operator [](int index) const{
    Node* p = head_;

    for (int i = 0; i &lt; index; i++){
            p = p-&gt;link();
    }

    return p;
}
</code></pre>

<p>I have another function in the class in which I want to access the Node* returned. one of the lines is</p>

<pre><code>if ((n = index_of_name(artistName)) &gt;= 0){
  Node* p = // code needed here
}
</code></pre>

<p>I want to be able to access the node at n by using the overloaded[]. How can I do that?</p>
