Accessing std::vector data members of a class from its member functions
<p>I have a class which defines the following members in a header file (.hpp):</p>

<pre><code>public :
  int loadData(char* filename);

private :
  std::vector&lt;vertex&gt; vertices;
  std::vector&lt;triangle&gt; triangles;
  std::vector&lt;frame&gt; frames;
</code></pre>

<p>The <code>vertex</code>, <code>triangle</code> and <code>frame</code> are structures defined in another header file included in this header file.</p>

<p>Now, in the definition of the function <code>loadData</code> in the .cpp, I cannot access the members <code>vertices</code>, <code>triangles</code> and <code>frames</code>. For example, I have the following code resulting in the error shown under it:</p>

<pre><code>cout &lt;&lt; "total vertices stored= " &lt;&lt; vertices.size() &lt;&lt; endl;

motionViewer.cpp:59: error: 'vertices' was not declared in this scope
</code></pre>

<p>Why cannot I access these members?</p>

<p>Thank you for the help.</p>
