title: c++: No instance of overloaded function?
body: <pre><code>// stock.h
  
  #ifndef STOCK_H
  #define STOCK_H
  
  // declare Stock Class
  class Stock
  {
  private:
      string StockExchange;
      string Symbol;
      string Company;
      double Price;
      int Shares;
  public:
      Stock();
      Stock(string stockExchange, string symbol, string company, double price, int shares);
      void displayStockInfo();
      void setStockInfo(string stockExchange, string symbol, string company, double price, int shares);
      double getValue();
      bool operator &lt; (Stock &amp; aStock);
      bool Stock::operator &gt; (Stock &amp; aStock);
  };
  
  #endif
  </code></pre>
  
  <p>[break]</p>
  
  <pre><code>//main.cpp
  
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;fstream&gt;
  
  #include "stock.h"
  
  using std::string;
  using std::endl;
  using std::cout;
  using std::setw;
  using std::ifstream;
  
  
  // *******************************
  // Stock class
  
  Stock::Stock() {
      StockExchange = "";
      Symbol = "";
      Company = "";
      Price = 0.0;
      Shares = 0;
  }
  
  Stock::Stock(string stockExchange, string symbol, string company, double price, int shares) {
      StockExchange = stockExchange;
      Symbol = symbol;
      Company = company;
      Price = price;
      Shares = shares;
  }
  
  
  // end Stock class
  // *******************************
  
  ...
  </code></pre>
  
  <p>My error says something along the lines of "no instance of overloaded function Stock::Stock(string stockExchange, string symbol, string company, double price, int shares) exists."</p>
  
  <p>What am I doing wrong? I see it in my header file.</p>