title: Operator issues with cout
body: <p>I have a simple package class which is overloaded so I can output package data simply with cout &lt;&lt; packagename. I also have two data types, name which is a string and shipping cost with a double.</p>
  
  <pre><code>protected:
      string name;
      string address;
      double weight;
      double shippingcost;
  </code></pre>
  
  <hr>
  
  <pre><code>ostream &amp;operator&lt;&lt;( ostream &amp;output, const Package &amp;package )
  {
      output &lt;&lt; "Package Information ---------------";
      output &lt;&lt; "Recipient: " &lt;&lt; package.name &lt;&lt; endl;
      output &lt;&lt; "Shipping Cost (including any applicable fees): " &lt;&lt; package.shippingcost;
  </code></pre>
  
  <p>The problem is occurring with the 4th line (output &lt;&lt; "Recipient:...). I'm receiving the error "no operator "&lt;&lt;" matches these operands". However, line 5 is fine.</p>
  
  <p>I'm guessing this has to do with the data type being a string for the package name. Any ideas?</p>