access a variable by reference from a class in c++
<p>I have a class in c++ a portion of which is below</p>

<pre><code>class Node{
    public:
       vector&lt;string&gt; getNames() const;
    private:
        vector&lt;string&gt; names_;
};
vector&lt;string&gt; Node::getNames(){
    return names_;
}
</code></pre>

<p>the function getNames() passes a copy of the vector. How can i modify my class so that i can reference the vector 'by const reference' from any other class that i declare the Node object instead of passing a copy?</p>
