How do I point at a vector in another class?
<p>I have a class that holds a vector, which also inherits another class:</p>

<pre><code>class txtExt : public extention
{
private:
   string  openedFile_;
public:
   vector&lt;string&gt; txtVector; //the vector i want to call
};
</code></pre>

<p>I fill the vector in a method within a class:</p>

<pre><code>class Manager : public extention
{
   // there is some other code here that I know does work
   // and it calls this function:
   void organizeExtention(string filename, string ext)
   {
      if(ext == "txt")
      {
         txtExt txtExt;
         txtExt.txtVector.pushback(filename);
      }
   }
}
</code></pre>

<p>and this is my main class where i attempt to call the vector:</p>

<pre><code>int main()
{
   // some code here that does previous operations like getting the path
   // and filling the vector


   // I've tried many ways of trying to call the vector
   // here is an example of one:
   vector&lt;txtExt*&gt; testVector;
   for(int i = 0; i &lt; testVector.size(); ++i)
   {
      cout &lt;&lt; testVector[i] &lt;&lt; endl;
   }
   return 0;
}
</code></pre>

<p>I have a few questions:</p>

<ol>
<li>Am I calling the vector wrong?</li>
<li>Is my vector empty?</li>
<li>Do I have to make my vector global, so other classes can see it?</li>
</ol>

<p>Note: I've been able to print out the vector where I load the vector using a very simple for loop</p>
