title: Nothing shows up in console when I try use a function on the contents of an array
body: <p>I'm working on a program for my programming class and I'm not getting any output. It is mostly about classes and vectors. If I run the constructor (called myDairy) and call <code>myDairy().getDescription()</code> (getDescription is an inherited function in the dairy class) I get the output I want. If I assign myDairy to a vector, I don't get any output doing <code>basket[0].getDescription()</code>. I was wondering why this is and how to fix it? 
  Thank you!</p>
  
  <p>//main function trying to call the constructors</p>
  
  <pre><code>milk myMilk = milk("Strawberry ", "2%");
  dairy myDairy = dairy(false);
  
  vector&lt;groceries&gt; basket;
  
  basket.push_back(myMilk);
  basket.push_back(myDairy);
  
  basket[0].getDescription();
  basket[1].getDescription();
  myMilk.getDescription();
  </code></pre>
  
  <pre><code>//the getDescription() function
  
  void dairy::getDescription()
  {
      //check if dairy is spoiled
      cout &lt;&lt; "The dairy in your basket is ";
  
      if (mSpoiled == true)
          cout &lt;&lt; "spoiled." &lt;&lt; endl;
      else if (mSpoiled == false)
          cout &lt;&lt; "not spoiled." &lt;&lt; endl;
  }
  
  </code></pre>
  
  <p>Let me know if you need more code!</p>